Hi, I have an entry form that uses a custom function to calculate hours and minutes between two times. Someone enters in a beginning time(timein), an end time (timeout) and a 3rd textbox populates with the hours and minutes using the custom function.
edit: the value of the calculated time difference is then put in a linked textbox (txtTotalHours) via VBA, to be stored in the table itself. txtTotalHours holds an actual value, not an expression
I am trying to make another textbox that has an expression to alert the person entering if the total hours is greater than 12 -
The idea is that if the calculated hours is greater than twelve then whoever is keying the data messed up the Time in or time out
Everything I have tried
none are working. anyone know why?
edit: the value of the calculated time difference is then put in a linked textbox (txtTotalHours) via VBA, to be stored in the table itself. txtTotalHours holds an actual value, not an expression
I am trying to make another textbox that has an expression to alert the person entering if the total hours is greater than 12 -
The idea is that if the calculated hours is greater than twelve then whoever is keying the data messed up the Time in or time out
Everything I have tried
Code:
iif([txtTotalHours] Between #0# AND #12#,"no error","error")
iif([txtTotalHours] Between #00:00# AND #12:00#,"no error","error")
iif([txtTotalHours] Between "00:00" AND "12:00","no error","error")
iif([txtTotalHours] > "12:00","error","no error")
iif([txtTotalHours] > #12:00#,"error","no error")
iif(Left([txtTotalHours],2) > "12","error","no error")
none are working. anyone know why?
Last edited: