Hi I have been trying to highlight time value if it greater than the value stored in table.
But it does not work with ">" symbol.
But If I use "<>" then my code works, dont understand why not with ">"
I tried it from conditional formating and give it value from table or from a field to compare it does not work, but If I write the value itself (07:45:01) then it works.
But the same value is stored in table,
Table name = TimeSettings, Field is TimeIn (format: hh:nn:ss)
My vba code is here (on form load)
As I said above, this works only if I say not equal to "<>".
What is my mistake? Thank you
But it does not work with ">" symbol.
But If I use "<>" then my code works, dont understand why not with ">"
I tried it from conditional formating and give it value from table or from a field to compare it does not work, but If I write the value itself (07:45:01) then it works.
But the same value is stored in table,
Table name = TimeSettings, Field is TimeIn (format: hh:nn:ss)
My vba code is here (on form load)
Code:
Dim CheckInTime As String
CheckInTime = TimeValue(DLookup("TimeIn", "TimeSettings"))
If CheckInTime > Me.txtTimeIn.Value Then
Me.txtTimeIn.BackColor = RGB(255, 0, 0)
End If
What is my mistake? Thank you