Access Table Primary Key

snidy1

Golden Member
Mar 17, 2003
1,285
0
0
I have a Table of Item numbers with there warehouse location. I want to use the Item number as the primary key, but some item numbers have two or three locations which makes duplicates. Is there a way to have the duplicate item numbers autimaticly move from the collum to the same row as secondary locations? Or I could do without the secomdary locations if there's a way to not allow duplicate item numbers to be pulled across into the table. I have my query set up to not allow duplicate rows, but since the locations are different, it doesn't work.
Thank's
 

EagleKeeper

Discussion Club Moderator<br>Elite Member
Staff member
Oct 30, 2000
42,589
5
0
Originally posted by: Nocturnal
You could use your item number + something else to make a composite key.

Location * (ndigits+2)**10 + item number

If that number will be to big, convert into a string for the index.