Userform Validation Issue
I am trying to build validations into a userform to make sure that all
requested data is entered. However, the validation is not working, allowing
null values to be saved, which is not good given that the form feeds a
database through ADO code.
I think the problem is that I typically program VBA in Access, and likely
have an Excel VBA syntax issue. Below is an example of the code I am using to
validate. Any suggestions?
Thanks,
Leo
Private Sub btnSubmit_Click()
On Error GoTo catch
'Validate form inputs
If IsNull(Me.txtName.Value) Then
MsgBox "Please enter customer's name!", , "INFO REQUIRED"
Exit Sub
End If
Exit Sub
|