No Blank entries

  • Thread starter Thread starter nybaseball22
  • Start date Start date
N

nybaseball22

Hello. I know this should probably go in the Microsoft Access Tables
group, but it doesnt seem to have much activity, so I thought someone
here might be able to help. I want to know if there is a way I can
change my table so it will not allow blank entries. I know you can
usually do this by making a primary field, however I often have
records that are the same so I don't think I can use this technique.

Thanks.
 
There are a couple of ways to do this.
One is to set a validation rule for the table fields to exclude Nulls (a
blank field is Null). Another is to use the Form's Before update event to
check for Nulls in required fields and cancel the update if Nulls are found.

To use the Validation Rule, Put Is Not Null in the Validation Rule property
of the field in table design view.

To test using the form Before Update:

If IsNull(Me.SomeControl) Then
MsgBox "SomeControl Requires a value
Cancel = True
End If
 
Back
Top