I am struggling to find the right solution for my situation. I am still very new to Access, continuous forms and VBA, so excuse my ignorance
I have a continuous form in Access 2007. One of the controls on the form is a text box with an expected arrival date. This control can be edited by the user. I need to validate that this control is not blank before running my insert and/or update SQL queries.
Currently I am validating this in a button click event, but this only checks the first line on the form and when a value is entered on the first line, it continues with the insert/update commands.
I need to validate that all the expected arrival date values are entered before any SQL queries may execute.
Expand|Select|Wrap|Line Numbers
- If Me.ArrivalDate = "" Or IsNull(Me.ArrivalDate) Then
- MsgBox "You have not selected an arrival date!", vbCritical + vbOKOnly, "Empty Arrival Date!"
- Me.ArrivalDate.SetFocus
- Exit Sub
- End If