No Blank entries

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.
 
K

Klatuu

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
 

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