Error message on required field

  • Thread starter Thread starter Debbiedo
  • Start date Start date
D

Debbiedo

I have an Access 2003 data entry form that gives me a cryptic message
from the system when I get to the end of the file.

The field that is causing problems is required and cannot contain null
data. I want it this way.

The messsage I get is:

"The field "ID" cannot contain a Null value because the Required
property is set to True. Enter a value in this field."

I do not want to enter a value in this field.

When I get to the end of the file I would rather just get a message
that says:

"End of file. Please go back a record or exit program."

And then I return to the form. Right now I can only exit the form
accompanied by rather cryptic messages that I do not want my end users
to freak out about.

Ideas anyone?
 
In table design view, set the Required property of the field to No.

Instead, set its Validation Rule to:
Is Not Null

You can then have whatever message you want.
Just type it in the Validation Text property.
 
In table design view, set the Required property of the field to No.

Instead, set its Validation Rule to:
Is Not Null

You can then have whatever message you want.
Just type it in the Validation Text property.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users -http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.














- Show quoted text -

This solution did not solve the problem. When I get to a new empty
record (i.e. the end of the file), I cannot go back a record or exit
out of the program without getting the previously mentioned error
message unless I enter new data, which I do not want to do. I do have
code in the On Current event such as make Field A = 1. The form is
basically for editing and updating existing data, not for adding new
data.

Other ideas?

Deb
 
Back
Top