Form/Table problem

snagrat

Registered User.
Local time
Today, 17:23
Joined
Apr 2, 2002
Messages
61
I have a form which opens in Data Entry.

If I enter some of the data but leave 1 of the required fields blank, the form will still close but the data will not be added to the table.

How can I tell access to check that the data is present and correct and if it is not then an error message comes up?

And also if I enter the details of another item already in the table, then again the form will change but no data is added to the table. Here I want an error box saying that the ProductID enter is already present, and a unique on must be entered.

Cheers
 
Have you set the Unique ID in the table? And have you set the other fields that are required to "REQUIRED" in the table? If so, when you fail to enter data in a required field, Access will prompt you that it cannot save the record due to a required field not being filled in.

HTH
 
jfgamibit is correct in all of his post but I caution you about using required fields. Are you positive that you will ALWAYS have all the data that you need to fill out the form? If not you won't be able to save the record because of one missing piece of information.

When I developed my first db I made a lot of the fields required and soon began to realize that I would rather be able to enter information as it became available instead of waiting until I had every last piece.

Autoeng
 
Auto is correct in his post of my post...

Make sure you really, really, really, need the information to be required.:D
 
My form has only two text box on it. Both are bound to tblTemp.

Both are also set as required.

However I can not enter any data in one box and the record will still save.

And vise versa.

I don't understand why. Is there another way I can make sure that some data is entered?
 
You must have a default set for the field in the table or the form.
 

Users who are viewing this thread

Back
Top Bottom