Hello Everyone, I have a situation where I am needing to create a couple of Constants to use in my code. I need to create a "Dayshift" and a "Nightshift" constant (one each).
Dayshift = Current Date from 6:00 am until current date at 5:59 pm.
Nighshift = Current Date from 6:00 pm until the next day at 5:59 am.
I am relatively new to Access 2013 & VBA and I am having no luck scouring the web for tips / hints as to how to accomplish this.
My shift db that I am creating, works up until Midnight. When the next day rolls around, my current code will break.
I am using a table called "tblshift" that will contain only two entries per day. 1 for dayshift and 1 for nightshift. The current code does comparisons using the date & time. If within the range for Day or Night, it will execute it section. I know I will have a problem between 12:00 am and 5:59 am because the date will increment by 1. I am trying to simplify by implementing the two Constants "Dayshift" & "Nightshift".
I hope this info helps someone to provide me with some help. Thank you, Patrick:banghead:
Dayshift = Current Date from 6:00 am until current date at 5:59 pm.
Nighshift = Current Date from 6:00 pm until the next day at 5:59 am.
I am relatively new to Access 2013 & VBA and I am having no luck scouring the web for tips / hints as to how to accomplish this.
My shift db that I am creating, works up until Midnight. When the next day rolls around, my current code will break.
I am using a table called "tblshift" that will contain only two entries per day. 1 for dayshift and 1 for nightshift. The current code does comparisons using the date & time. If within the range for Day or Night, it will execute it section. I know I will have a problem between 12:00 am and 5:59 am because the date will increment by 1. I am trying to simplify by implementing the two Constants "Dayshift" & "Nightshift".
I hope this info helps someone to provide me with some help. Thank you, Patrick:banghead: