I am trying to get a basic msgbox to have a cancel button as well as an ok button. The purpose is to do a little validation in the Before Update event. I have tried these two examples
If Len(Me.Counsellor & vbNullString) = 0 Then
MsgBox "The Employer Liason Field can not be left blank."
Cancel = True
Me.Counsellor.SetFocus
Cancel = True
End If
If Nz(Counsellor, "") = "" Then
Cancel = True 'if necessary
MsgBox ("The Employer Liason field can not be left blank.")
Counsellor.SetFocus
End If
Does anyone have any suggestions.....
If Len(Me.Counsellor & vbNullString) = 0 Then
MsgBox "The Employer Liason Field can not be left blank."
Cancel = True
Me.Counsellor.SetFocus
Cancel = True
End If
If Nz(Counsellor, "") = "" Then
Cancel = True 'if necessary
MsgBox ("The Employer Liason field can not be left blank.")
Counsellor.SetFocus
End If
Does anyone have any suggestions.....
Last edited: