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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

setting 2 fields together to be unique

Status
Not open for further replies.

mickywall

Programmer
Sep 2, 2002
88
GB
how can i set two fields together to be unique rather than the pk...

i already have a pk..

thanks.
 
Hi there,

In design view of your table, goto the menubar and Select "View", then select "Indexes". This dialog box lists all indexes in the table.

To set two fields as being unique, do the following:

1. In the "Index Name" column, type a description of the index e.g. "TwoColumns".

2. In the "FieldName" column, select the first field of the index

3. In the next row below leave the "Index Name" field blank, but select the second field of the index.

4. Click back on your index name, e.g. "TwoColumns" and at the buttom of the dialog box there should be a field called "Unique". Change this value to "Yes"

5. Save your table


All done,

Hope this helps.
Cheers,
Dan

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top