Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
When I am adding records to my database, occasionally an error message pops up that doesn't make much sense. Index or primary key cannot contain a Null value. And when that happens, no matter what you do, it won't let you out. So let's recreate that error. I am in my Customers table and I will make a new blank record, but Tab over your primary key or ID field so that it's left blank. I will fill in a few fields of information. Now, click off the record and the error message pops up. When I click OK and I try and get out again, it still won't let me.
The only thing you can do to get out is to press the Escape key in the upper left corner of your keyboard, but that will erase all the information that you entered. The error is simple but not obvious. As we created the record, we left the primary key filed empty. You didn't enter the ID that distinguishes this record from all the other records in the table. So let's try again. Start with your ID or primary key field and then enter in the rest of the data.
When you move to the next record, this time everything will be fine. I see beginners make this cannot contain a Null value error all the time, and it leaves them flustered and frustrated because the error message itself doesn't help you identify the underlying problem. But once you remember that your table's primary key field is required, it all makes sense. If you are not familiar with primary keys, please see your Access 2010 Essential Training for detailed information.
Get unlimited access to all courses for just $25/month.Become a member
82 Video lessons · 81419 Viewers
80 Video lessons · 133282 Viewers
52 Video lessons · 66644 Viewers
59 Video lessons · 52466 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.