Help with Multiple Field Primary Keys

  • Thread starter Thread starter Edm
  • Start date Start date
E

Edm

Hi

I have a table with 2 fields used as primary key, Model
and Serial Number. This is done because the same serial
can be used for different models, but never will the same
model have the same SN.

I have set the keys up, but the program refuses to
recognize the model as part of the key when I enter it
into the table. It reverts to serial number only, causing
the new data (if the serials match older data) to be
removed.

How do I get the model number and serial number to both be
looked at when determining whether a unit can be entered
into the system. Note: I cannot change how my
manufacturers do their serializations.

Thanks,

Edm
 
in table design view, hold down the control key while you click the serial
number field and then the model field. This will highlight both, then click
the "key" icon near the top of your screen.

Rick B


Hi

I have a table with 2 fields used as primary key, Model
and Serial Number. This is done because the same serial
can be used for different models, but never will the same
model have the same SN.

I have set the keys up, but the program refuses to
recognize the model as part of the key when I enter it
into the table. It reverts to serial number only, causing
the new data (if the serials match older data) to be
removed.

How do I get the model number and serial number to both be
looked at when determining whether a unit can be entered
into the system. Note: I cannot change how my
manufacturers do their serializations.

Thanks,

Edm
 
I have set the keys up, but the program refuses to
recognize the model as part of the key when I enter it
into the table. It reverts to serial number only, causing
the new data (if the serials match older data) to be
removed.

Rick's suggestion should do the trick; you should also check the
properties of the Serials field to be sure that it does not have a
unique Index set.
 
Hi,

Ive done what you suggested, the problem is that the
program is actually ignoring it the model field when
primary key is looked at. It finds a matching serial, and
ignores model data entirely, discarding all information
relating to the new model entry.

Edm
 
Back
Top