Cannot insert NULL error message

C

cavyman

I have a form that has a required field, "Site", and in the table
containing Site I have allow nulls unchecked. When I create a new
record in my form but do not put a value into Site, upon trying to
close the form I receive the error message:

Cannot insert the value NULL into column 'Site', table
'ProposalsSQL.dbo.Proposal"; column does not allow nulls. INSERT fails.

Now, that is fine with me as I don't want the record to save with a
null in Site. However, I want the form to just close without saving the
record and without spawning the above error message. I'm doing my best
to learn VBA, but I don't know how to keep the error message from
appearing. Any ideas? Thanks so much!
 
Top