Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Help   Contact   Merch   Join   Order   Logon   Forums   
 
Back to Calendar Seminar Lessons    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Sort Shift Field
Mark Desens 
      
4 years ago
Hi Richard and guys. This weekend me and my coworker Frank who will be dealing with the Calendar form more than anyone. He really likes it. I had to redo some of the fields in and include a shift field. In this field it goes by the time from 2am to 10pm. they are divided into 4 hour shifts. starting at 2am ending with 10pm. How can I put this shift field in numerical order. In the criteria or VBA code?
Kevin Robertson  @Reply  
           
4 years ago
Just sort on whatever field signifies the shift, then also sort on the DateTime field.
Example: ShiftID, ShiftDateTime
Scott Axton  @Reply  
      
4 years ago
Just to add to Kevin's post.  If I have a field like that that I want to name but the names don't sort alphabetically you could do one of two methods.

1. Create a lookup table  ShiftT  In this case DON'T make a Primary Key that is Autonumber
      Do make it Indexed No Duplicates

   Fields:  
       ShiftID  as Long  PK
       ShiftName as Short Text
       Description
  
   Data:
      1      Day Shift     Description
      2      Afternoon Shift     Description
      3      Evening Shift     Description
     ...      Other shifts     Description
      7      Late Evening  
      8      Over Night

(or what ever you name them)
Then #1 you avoid duplication of data since you use the ID  AND
        #2 you can sort on the ID to suit your needs.

The other method I use is to add a SrtSeq field as Long  (Sort Sequence - just my naming ) and use that field to sort with.
If I do it this way I create the Autonumber field for my ID.

      

Mark Desens OP  @Reply  
      
4 years ago
Hey Scott and Kevin. Thanks for letting me know, the advise and tips. To let you know I am only a biginner is code. I would like to advance in it but expenses too low because of car repair and family. You guys are more advanced in it. I only got to video 4 of the expert series and can't go any further because of our nonprofit organization's budget. I'll ask Frank about this way but the way he explained it we need to see the people on what shift and the shifts that need to be filled. This is only for our calendar since it only has 5 fields and 2 of them are "shift" and "P" for primary. We need to see what shift the people are on and if they are filling in for someone else. I'll ask him.
Richard Rost  @Reply  
           
4 years ago
You shouldn't need any advanced programming to do this. Both solutions are simple enough.
Mark Desens OP  @Reply  
      
4 years ago
Hi Richard, simple for people who know VBA code. I am only beginning in code but learning as I go.
Richard Rost  @Reply  
           
4 years ago
You've got Developer 1. That's the best place to start. Keep truckin'. :)

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Calendar Seminar Lessons.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 8/5/2026 10:47:36 AM. PLT: 0s