Index or primary key cannot contain a Null value

catacherra

New member
Local time
Today, 10:26
Joined
Mar 9, 2009
Messages
1
I have office 2007 and when I open the form to enter my quilt show information I get the error "Index or primary key cannot contain a Null value" It has been a long time since I worked with access, but I hope someone can help me. I don't even know where to start.
 
I'd guess that you have either an OnOpen event or an OnCurrent event that tries to save or requery your record. If the form opens up on a new record then you may get an error because the primary key field is blank for that record.

Have a look at your form in design view and see what events you have running. If it is an event problem and you need more help then post the code for the events.

Alternatively, next time you get the error message, don't click OK, instead press Ctrl+Break. If you get a message box with a Debug button, click this and it'll take to the line of code that's causing it a problem. This should give us a better idea of exactly where it's tripping over itself.
 

Users who are viewing this thread

Back
Top Bottom