View Single Post
  #2  
Old May 27th, 2010, 03:53 PM posted to microsoft.public.access.gettingstarted
John Spencer
external usenet poster
 
Posts: 7,815
Default Help with Function: Between Time

If Time #12:01:00 AM# AND Time #3:00:00 PM# Then
MsgBox "DAY SHIFT"
Else
MsgBox "NIGTH SHIFT"
End If

Note that you need to repeat the entire comparison.

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County

Bre-x wrote:
Hi,

Why this function is not working?

If a time follows between 12AM and 3PM it should show Day shift, anything
else Night Shift

If Time #12:01:00 AM# #3:00:00 PM# Then
MsgBox "DAY SHIFT"
Else
MsgBox "NIGTH SHIFT"
End If