Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Index cannot contain null value error

Status
Not open for further replies.

katoc

Programmer
Feb 15, 2005
52
US
Hello.

I have a form for data entry. When a user hits 'new' but then decides to close the form before any data entry is done, I get the error "Index or Primary key cannot contain a null value". There is one value in the form that is automatically populated in the form_current function. Which property/method do I use to undo any changes when the user closes the form on a new record?

Thanks
 
I'd use the BeforeUpdate event of the form to enforce all the validation rules.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top