Discussion Locked

unique constraint in ms-access

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
HOW TO SET UNIQUE KEY FOR A COLUMN IN MS-ACCESS?

5 replies

by r. a. caluste

make an autonumber type field. having an identity and incrementing everytime, you can guarantee its uniqueness. i use this for most of my primary key fields.

by ananthap

2 ways.
First the hard. In the design view,
- position the selection bar against the column which must become the unique key.
- Right click in the left most column.
- Select the key symbol. (Default is usually set to unique).
- Keeping the cursor in the same row, tab to near the bottom od the screen and select "duplicates allowed" = NO.

Next the easy way. (for a new table).
- Make the design without choosing the unique key.
- Close the window.
- Access will suggest that you choose a unique key.
- CHOOSE YOUR CHOICE.

Best of Lux.
ens od mail.

This discussion is closed to new replies.