Unique Entries in Multiple Fields

D

David

Hello,

Does anyone know how set two table fields so that each field can have
duplicate values in different records but so that both fields put
together must have unique values in each record.

For example:

if this is the first record in the table:
Field1 = 2
Field2 = 3

this is acceptable for the next record (one field is different, the
other is the same, it doesn't matter which field is different):
Field1 = 2
Field2 = 4


so is this (both fields are different):
Field1 = 4
Field2 = 5

but this must not be allowed (both fields are the same):
Field1 = 2
Field2 = 3


Cheers,

David
 
R

rowiga

Set the primary key in the table to both fields. In table design view,
highlight both fields and click on the "key" symbol on the toolbar.
 

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

Similar Threads


Top