Required

A

Amour

Hi I am new to Access.

I have a key field and have it as "Required = yes" when a user adds a
record this works fine and will not allow the record to be written. In
update, if the user deletes that field then it still keeps the record with
that field being blank (This is not good). I need to know of some ways of
fixing this. Like if in update mode this field is protected and can not be
deleted (only by an actual delete of the record). Maybe there is a code in
VBA that if Order Number (within the table) is greater than blanks, then have
Locked = yes. If someone know's this then please post the code and were to
put this expression.

Thank You very much....
 
P

Pat Hartman \(MVP\)

If the field is defined as required in the table, you shouldn't need to do
this. Access won't let the record be saved. There are situations where the
user can manage to get a zero-length string into the field. That looks like
a blank field but it's not and it is also not null so the required test is
passed. The solution is to uncheck the allow ZLS property when you want
text fields to be required.
Also make sure there is no default.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top