Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OK I have a table Link, in this tab

Status
Not open for further replies.

rbasram

Programmer
Sep 27, 2001
53
CA
OK I have a table Link, in this table I have the fields REC#,TNum, Sequence, Title,DocumentID(Foreign Key),Product(Foreign Key), Is there a way I can set the candidate keys in access, in the table above I want that TNum, DocumentID and Product cannot be same for two records.

Does anyone know how to set this not through the code but via access.
 
Go to the design view of the table and create an index (click on the lightening bolt) which is the segmentation of the three fields, and then make the index unique.

The index has a singular name such as idxThreeFields and is made up of the three fields you mentioned. Visually when you are building it, it show look like this:
Index Field
----------------- ----------
idxThreeFields TNum
DocumentId
Product
 
Go to the table design - indexed section and select Yes No Duplicates.

bye

Martin.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top