Help: Error - Index or primary key can not contain Null value.

  • Thread starter Thread starter Naresh Kumar Saini
  • Start date Start date
N

Naresh Kumar Saini

I created a table and using Linkup wizard linked two
columns of another table in it. For example, there is a
Gender field which would be repeated repeatedly: 1 -
Male; 2 - Female. The wizard sets the Row Source property
of this field like: "SELECT Sex.SexID, Sex.SexCode,
Sex.Sex FROM Sex; ". The Sex table have only three field:
SexID, SexCode and Sex and only two records.

Now, if I edit this field in the parent (related) table
and try to type in a value '1' or '2' or even choose from
the drop down box, it do not accept it. When I save the
record or go to next record, it gives the message: "Index
or primary key can not contain Null value. [OK]" and
then "You cannot save this record at this time ..."

Any help please

Naresh
 
Please ignore the post. It was a dumb mistake. I had mistakenly set the main
ID field as 'text' whereas it should have been 'autonumber'. The unexpected
error message confused and I was looking everywhere else except the
field-type of the ID field. Now it is working fine.

Naresh
 
Back
Top