T
Ted
I need to compare two time intervals in both military and Long time formats.
I have an application which needs to toggle the fore color of the time
display if the current system time is prior to >= to 8 pm toggle color red
else toggle color green. Can anyone provide me with some advice on how to
accomplish this. Here some sample code:
Select Case Me!optgrpTime.Value
Case 1
Me!txtSysClock.Format = "Long Time"
strCurTime = CStr(Me!txtSysClock)
If CDate(strCurTime) >= CDate("8:00:00 PM") Then
Me!txtSysClock.ForeColor = 255
Else
Me!txtSysClock.ForeColor = 32768
End If
Case 2
Me!txtSysClock.Format = "hh:mm:ss"
strCurTime = CStr(Format(Me!txtSysClock, "hh:mm:ss"))
If CDate(strCurTime) >= CDate("20:00:00") Then
Me!txtSysClock.ForeColor = 255
Else
Me!txtSysClock.ForeColor = 32768
End If
End Select
I have an application which needs to toggle the fore color of the time
display if the current system time is prior to >= to 8 pm toggle color red
else toggle color green. Can anyone provide me with some advice on how to
accomplish this. Here some sample code:
Select Case Me!optgrpTime.Value
Case 1
Me!txtSysClock.Format = "Long Time"
strCurTime = CStr(Me!txtSysClock)
If CDate(strCurTime) >= CDate("8:00:00 PM") Then
Me!txtSysClock.ForeColor = 255
Else
Me!txtSysClock.ForeColor = 32768
End If
Case 2
Me!txtSysClock.Format = "hh:mm:ss"
strCurTime = CStr(Format(Me!txtSysClock, "hh:mm:ss"))
If CDate(strCurTime) >= CDate("20:00:00") Then
Me!txtSysClock.ForeColor = 255
Else
Me!txtSysClock.ForeColor = 32768
End If
End Select