Hello,
I am having a bit of a problem trying to set up a message box.
I have a date field and a time field as the last two fields on my form (continuous). I would like a message box to display if the time field (formatted "medium time") is left empty. It must be filled out to complete the record.
I am unable to use the "required" attribute, because the all of the data is not available right away, so the user would have to leave the record and come back to it.
Once the date is completed, I set the focus on the time. The problem is that I set up an "If" statement for "Lost focus" but nothing happens. I tried to use the conditions of "=0" and "", with neither working. Again, I am using the Medium time format.
Below is an abbreviated sampling of the code:
If txtjobEndTime.Value = 0 Then
msgbox "Time must be entered to complete record", vbOKOnly, "Error!"
End If
Any help will be appreciated.
Thanks,
Jake
I am having a bit of a problem trying to set up a message box.
I have a date field and a time field as the last two fields on my form (continuous). I would like a message box to display if the time field (formatted "medium time") is left empty. It must be filled out to complete the record.
I am unable to use the "required" attribute, because the all of the data is not available right away, so the user would have to leave the record and come back to it.
Once the date is completed, I set the focus on the time. The problem is that I set up an "If" statement for "Lost focus" but nothing happens. I tried to use the conditions of "=0" and "", with neither working. Again, I am using the Medium time format.
Below is an abbreviated sampling of the code:
If txtjobEndTime.Value = 0 Then
msgbox "Time must be entered to complete record", vbOKOnly, "Error!"
End If
Any help will be appreciated.
Thanks,
Jake