display message if field left empty (1 Viewer)

gpurger

Registered User.
Local time
Yesterday, 16:06
Joined
Apr 21, 2004
Messages
66
Hi,
I am trying to notify users to fill a specific field in if they forget it and can not work out which event to use.
Can you please help

Cheers

g
 

jrjr

A work in progress
Local time
Yesterday, 19:06
Joined
Jul 23, 2004
Messages
291
I typically use a submit button and in the onclick event will be code like this:

If IsNull(YourControlName) Then
MsgBox "You have to choose something in the YourControlName field!", , "Incomplete Form!"
YourControlName.SetFocus
End If
 

ghudson

Registered User.
Local time
Yesterday, 19:06
Joined
Jun 8, 2002
Messages
6,195
Use the forms BeforeUpdate event.
 

selenau837

Can still see y'all......
Local time
Yesterday, 19:06
Joined
Aug 26, 2005
Messages
2,211
jrjr said:
I typically use a submit button and in the onclick event will be code like this:

If IsNull(YourControlName) Then
MsgBox "You have to choose something in the YourControlName field!", , "Incomplete Form!"
YourControlName.SetFocus
End If

I have the same thing on my forms. However, another way I have tried to help the user, is to make the background of the required field a pale yellow color. That is also a visual way for them to know it is required outside of the validation code listed above
 

Users who are viewing this thread

Top Bottom