Code:
If (RST("Worktime") + Now() > RST("LeaveTime")) Then
MsgBox "Insufficient time to complete the work..."
End If
This piece of code checks if there's enough time left to complete the work seen from the current time, but "WorkTime" and "LeaveTime" are stored only with hours, minutes & seconds while Now() gives a full date, so my guess would be this won't work
I'd need to convert the Now() to a new date with only hours and minutes and seconds...
Only question is how...
I tried CDate(Format(Now(), "u:m:s")) as help said
"MyStr = Format(MyTime, "u:m:s") ' Geeft 17:4:23"
but that don't work (unmatching types)...