Mandatory fields (1 Viewer)

COMP

Registered User.
Local time
Today, 10:24
Joined
Jul 20, 2009
Messages
61
hi, i am trying to create a rule where is say staff fill in a new members form and forget to put in the name and leave it blank a meassage will appear stating that it needs to be filled in to progress. is there a validation rule for this in Access??
 

statsman

Active member
Local time
Today, 13:24
Joined
Aug 22, 2004
Messages
2,088
Open your table properties. Place the cursor in the field you require an entry.
In the area "Required", select Yes.

OR

If you are using a form for data entry, in the code for the command button to close the form or to save the record enter the following code:

If [fieldname] = " " then
MsgBox,"The fieldname may not be blank"
End
Endif

You would have to enter this code for each field you want an entry to be made.

Note: the expression " " would be used for a text field. For a numberic field the default would be zero. You could also use the IsNull function.
 

COMP

Registered User.
Local time
Today, 10:24
Joined
Jul 20, 2009
Messages
61
i have changed the required field to yes but you can still continue. I am entering data in form view but im not too sure on where to go to put in the alternative formula??
 

Users who are viewing this thread

Top Bottom