Primary key for multiple field

K

Khusro

In one table two fileds jointly create unique record (each filed has
duplicate record). How can I assign primary key to both fields to avoid
duplicate record ?
ex. Filed A has : A, B,B,A,C
Field B has : T, M,O M, T

Joinlty Field(A+B), AT,BM,BO,AM,CT (Unique Record)
 
S

Stefan Hoffmann

hi,
In one table two fileds jointly create unique record (each filed has
duplicate record). How can I assign primary key to both fields to avoid
duplicate record ?
Select (mark) both fields and set the primary key by pressing the
primary key button (in the tool bar or the context menu).


mfG
--> stefan <--
 
J

John W. Vinson

In one table two fileds jointly create unique record (each filed has
duplicate record). How can I assign primary key to both fields to avoid
duplicate record ?
ex. Filed A has : A, B,B,A,C
Field B has : T, M,O M, T

Joinlty Field(A+B), AT,BM,BO,AM,CT (Unique Record)

You do NOT need to - nor should you - create a third composite field.

Instead, open the table in design view. Ctrl-click field A and field B so
they're both selected, then click the Key icon; this will create a joint,
two-field primary key. Either individual field can have duplicates but the
combination must be unique.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top