E
EAB1977
Hi everyone,
I want to know if the below code will work. I am trying to compare
times to get a shift value in a text box.
Select Case Format(Me.datTime.Value, "Medium Time")
Case Format(rst!Shift1StartTime, "Medium Time") To Format(rst!
Shift1EndTime, "Medium Time")
Me.numShift.Value = 1
Case Format(rst!Shift2StartTime, "Medium Time") To Format(rst!
Shift2EndTime, "Medium Time")
Me.numShift.Value = 2
Case Format(rst!Shift3StartTime, "Medium Time") To Format(rst!
Shift3EndTime, "Medium Time")
Me.numShift.Value = 3
Case Else
Me.numShift.Value = "Unknown"
End Select
What am I doing wrong?
I want to know if the below code will work. I am trying to compare
times to get a shift value in a text box.
Select Case Format(Me.datTime.Value, "Medium Time")
Case Format(rst!Shift1StartTime, "Medium Time") To Format(rst!
Shift1EndTime, "Medium Time")
Me.numShift.Value = 1
Case Format(rst!Shift2StartTime, "Medium Time") To Format(rst!
Shift2EndTime, "Medium Time")
Me.numShift.Value = 2
Case Format(rst!Shift3StartTime, "Medium Time") To Format(rst!
Shift3EndTime, "Medium Time")
Me.numShift.Value = 3
Case Else
Me.numShift.Value = "Unknown"
End Select
What am I doing wrong?