G
Guest
I am trying to test for a null on a form with the following code. I am
putting it in On Exit.
If isnull(Me.Alt_ID) then
Cancel=True
Msgbox "Field cannot be null!"
Me.Alt_Id.SetFocus
end if
Whenever I test the code, it allows the null, does not come back with any
message, and does not setfocus on the field. I need it to pop up a message
with a null and return to the tested field. In other words, do not let the
user move forward until the field is populated.
Thanks for any help.
putting it in On Exit.
If isnull(Me.Alt_ID) then
Cancel=True
Msgbox "Field cannot be null!"
Me.Alt_Id.SetFocus
end if
Whenever I test the code, it allows the null, does not come back with any
message, and does not setfocus on the field. I need it to pop up a message
with a null and return to the tested field. In other words, do not let the
user move forward until the field is populated.
Thanks for any help.