Hello, all, and thanks for taking a moment to read my post. I've got a table listing each State and a Start and Stop time during which my people can place calls. The State is Text and the Start and Stop times are Date/Time formatted as Medium Time. I've got a recordset that loops thru the table, comparing first the state on my form against the State in the recordset, then if checks whether the current time is > the Start time, then whether the current time is < the Stop time (I tried writing it on a single line and had even worse problems!). There's no problem with my code checking for the State and the Start time, but it always errors on the Stop time (it skips to my Else statement when it should execute the next line of code). The following is the code:
Code:
Do Until rsCallTime.EOF
Select Case strWeekDay
Case 2, 3, 4, 5, 6 'Mon - Fri
If txtState = rsCallTime!State Then
If Format(Now, "hh:nn AM/PM") >= rsCallTime!WedStart Then
If Format(Now, "hh:nn AM/PM") < rsCallTime!WedStop Then
EnableSameDayCalls
Else
DisableSameDayCalls
Exit Sub
End If
End If
End If
Case 7 'Sat
End Select
rsCallTime.MoveNext
Loop
I'm throwing myself on your mercy! What am I doing wrong?!? I hope I've explained everything sufficiently for you. 'preciate any help you can provide.