G
Gee
I am using this code to check for blank fields in BeforeUpdate:
If NZ(Trim(Me!Date),vbnullstring) = vbnullstring then
Msgbox "PLEASE ENTER DATE",,"Missing date"
Me!Date.setfocus
Cancel = True
Exit Sub
End if
It almost works, except the form goes ahead and closes anyway. The user
clicks the close button and the message box pops up if the field is empty,
they click OK and instead of keeping the form open and then setting focus on
the empty field, it closes the form.
How can I get it to interupt the close and keep the form open?
Thank you in advance for any help you can give me.
Gee
If NZ(Trim(Me!Date),vbnullstring) = vbnullstring then
Msgbox "PLEASE ENTER DATE",,"Missing date"
Me!Date.setfocus
Cancel = True
Exit Sub
End if
It almost works, except the form goes ahead and closes anyway. The user
clicks the close button and the message box pops up if the field is empty,
they click OK and instead of keeping the form open and then setting focus on
the empty field, it closes the form.
How can I get it to interupt the close and keep the form open?
Thank you in advance for any help you can give me.
Gee