start time end time

  • Thread starter Thread starter Afrosheen
  • Start date Start date
A

Afrosheen

Thanks for reading this.

I'm looking for a routine that will compare two times. What I want it to do
is have the program accessable between the hours of 5:30am and 5:00pm, or
05:30 to 17:00 only.

I just can't grasp on how to do this.

Thanks,

I hope I can read the reply. Sometimes the message board will not display
the answer.
 
On Tue, 7 Oct 2008 18:06:01 -0700, Afrosheen

In your startup code write:
const BEGIN_TIME = #05:30#
const END_TIME = #17:00"
if Time < BEGIN_TIME or Time > END_TIME then
Msgbox "Yo! Can't use this app right now."
End
end if

-Tom.
Microsoft Access MVP
 
Thanks Tom, It works great.
What I'm using it for is that we have two shifts. My Boss wants access on
the day shift only and not the night shift. So this will work out ok.

I put the routine in the "On Activate" part of the form

Thanks again. I really appreciate the help.
 
Back
Top