Preventing Null records

R

Randy

My db keeps acquiring null records. (No Data). My form is set to cycle
current record only forcing the user to click an insert new record button.
I thought this would prevent null records but it doesn't. Any
ideas..Thanks...Randy
 
A

Allen Browne

Is there one of the fields that you could make required?
If so, open your table in design view, select the field, and set its
Required property to Yes (lower pane of table design.) Access will not not
be able to save a record unless this field has an entry.

If you want to check with the user whether the record should be saved when a
particular field is still Null, use the BeforeUpdate event of the form. This
is the event that Access fires just before saving the record. You can cancel
this event to prevent that save.

Form_BeforeUpdate is the *only* way to block a save in a bound form, because
there are so many ways a record can be saved, e.g. closing the form, closing
Access, applying a filter, changing the sort order, finding another record,
pressing Shift+Enter, choosing Save Record through the menu, requerying the
form, changing its RecordSource, and many others.
 
Top