M
MES via AccessMonster.com
I'm using the following code to require a user to populate a form field:
If Len(Trim(Nz(Me.UserMnemonic, ""))) = 0 Then
MsgBox "This field is required."
Cancel = True
End If
It suits my need; however, there is one small issue. I would like the user
to either fill in the required field, or close the form. I have a cancel
button on the form that closes the form, but once the user gets to a required
field, if they do not fill it in with something, they get hung up on that
field. Is there any way to use my cancel button without having to first fill
in the field?
Thanks in advance.
If Len(Trim(Nz(Me.UserMnemonic, ""))) = 0 Then
MsgBox "This field is required."
Cancel = True
End If
It suits my need; however, there is one small issue. I would like the user
to either fill in the required field, or close the form. I have a cancel
button on the form that closes the form, but once the user gets to a required
field, if they do not fill it in with something, they get hung up on that
field. Is there any way to use my cancel button without having to first fill
in the field?
Thanks in advance.