This is a sample of some required fields I am validating to see if null - if condition is null then I want the user to see a message box "All Required fields must be entered" and disable the AddNew button else Enable the AddNew button. Is there a way to check the text boxes to see if any one is null and then prompt for message and disable button else enable button???
If Len(Me![cmbType]) = 0 Then
If IsNull(Me![cmbType]) Then
Forms![frms19_1]![cmdaddnew].Enabled = False
txtMessage = "All Required fields must be entered before the record can be added." & vbNewLine & _
"Enter a value or press 'Cancel' to about the record."
Me![cmbType].SetFocus
Else
Forms![frms19_1]![cmdaddnew].Enabled = True ' if this is what you want
End If
ElseIf Len(Me![cmbID]) Then
If IsNull(Me![cmbID]) Then
Forms![frms19_1]![cmdaddnew].Enabled = False
txtMessage = "All Required fields must be entered before the record can be added." & vbNewLine & _
"Enter a value or press 'Cancel' to about the record."
Me![cmbID].SetFocus
Else
Me![cmbID].SetFocus
End If