Index or Primary Key Cannot Contain a Null Value

Index or Primary Key Cannot Contain a Null Value

Post by Gregc » Tue, 04 Apr 2006 12:10:15


G'day

I imported a spreadsheet into Access to create a table. I want to make
the Field Name "ItemID" the primary key, with a Data Type "Number".
Each Number begins with a 0.

When I try to save it it comes up with "Index or Primary Key Cannot
Contain a Null Value". Is this because each number begins with 0, and
if so is there a way around it.

Greg
 
 
 

Index or Primary Key Cannot Contain a Null Value

Post by Arvin Meye » Tue, 04 Apr 2006 12:17:44

There are no numbers which begin with a zero (except 0, of course) 01 is not
a number, it is text. Change your datatype to text if you need to begin each
value with a 0.