Watching:

Access 2010 and the "Cannot Contain a Null Value Error"


show more Understanding the "Cannot contain a Null value" error provides you with in-depth training on Business. Taught by Alicia Katz Pollock as part of the Access 2010 Power Shortcuts show less
please wait ...

Understanding the "Cannot contain a Null value" error

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.

Understanding the "Cannot contain a Null value" error
Video duration: 1m 29s 3h 43m Intermediate

Viewers:

Understanding the "Cannot contain a Null value" error provides you with in-depth training on Business. Taught by Alicia Katz Pollock as part of the Access 2010 Power Shortcuts

Subject:
Business
Software:
Access
Author:
please wait ...