Just a semantic pont, but, by definition, you can't have 2 primary keys.
Are you asking about having a primary key that has more than one field in
it? In that case, then yes, you can have the same product for multiple
suppliers, but you can't repeat a product for the the same supplier.

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
> Hi!
>
[quoted text clipped - 15 lines]
>
> Regards.
JulieD - 08 Aug 2004 05:15 GMT
Hi
following from Doug's post ...
leave the index settings alone ... creating a primary key with two fields
will do the type of "validation" that you want .. .
however be careful if you set the primary key with the fields described you
are in fact saying that supplier A can only EVER buy product A once ...
maybe you need to include a date field in the primary key so that supplier A
can only purchase product A on a single date, but can purchase product A
again later on.
Regards
JulieD
> Just a semantic pont, but, by definition, you can't have 2 primary keys.
>
[quoted text clipped - 21 lines]
> >
> > Regards.
Amir - 08 Aug 2004 07:15 GMT
Hi there!
In my DB there is a table with double field primary key:
It's primary key is builded from the ReceiptNumber and
the ReceiptSupplier Fields. I thought this is good because
one supplier can't have more than one Receipt with the same
number, but different suppliers can use the same receipt number.
What should I put in the index? After all, I want
to allow duplicates in the receipt numbers
but I only want to allow it if it's for different suppliers.
Amir.
> Hi
>
[quoted text clipped - 36 lines]
> > >
> > > Regards.
Douglas J. Steele - 08 Aug 2004 11:54 GMT
As Julie said, you put both fields in the primary key.
When you have the table open in Design mode, highlight both fields, then
click on the "Key" icon to create the primary key.

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
> Hi there!
>
[quoted text clipped - 53 lines]
> > > >
> > > > Regards.
Amir - 09 Aug 2004 01:50 GMT
OK, Thank you very much!
> As Julie said, you put both fields in the primary key.
>
[quoted text clipped - 61 lines]
> > > > >
> > > > > Regards.