Hi,
I have a field that calculates times in 24hr format on a form, and occasionally users will enter the wrong time in and the calculation will display "#Erorr" but they wont notice and they will continue on. The fields name is "ElapsedTime".
So, I would like to create a popup box in VBA that would basically tell them tocheck their times for incorrect entries.
I have created what I think is a If statement, but it wont popup a box. I put it in the object AfterUpdate property and the On Dirty property.
Here is the code:
Code:
Private Sub ElapsedTime_AfterUpdate()
If Me.ElapsedTime = "#Error" Then
MsgBox "Please double check your time entries" _
& vbCrLf & "and try again.", vbCritical, _
"There is an incorrect time entry!."
End If
End Sub
Can anyone offer any tips on what I could be doing wrong?
Thanks in advance. FunkyG