I want to determine the time of day when a user to the database I am developing logs on. If the time is between 07:30 abd 15:30 the database will know that this is the "First" shift and make a note in the data record that is in view. But I am having trouble writing the correct conditional code. I thought that I could simply use something like this:
If (Now() >= 730 < 1530) Then
Forms!BackScreenF!Shift = "First"
ElseIf (Now() >= 1530 < 2330) Then
Forms!BackScreenF!Shift = "Second"
ElseIf (Now() >= 2330 < 730) Then
Forms!BackScreenF!Shift = "Third"
But this is not working as I thought it would, because this code returns any time of the day as the first instance giving the the result as the "First" shift. Does anyone have experience in trying to run this type of condition or expression?
Thanks .... Erik Cross
If (Now() >= 730 < 1530) Then
Forms!BackScreenF!Shift = "First"
ElseIf (Now() >= 1530 < 2330) Then
Forms!BackScreenF!Shift = "Second"
ElseIf (Now() >= 2330 < 730) Then
Forms!BackScreenF!Shift = "Third"
But this is not working as I thought it would, because this code returns any time of the day as the first instance giving the the result as the "First" shift. Does anyone have experience in trying to run this type of condition or expression?
Thanks .... Erik Cross