?
Solved

Unique Constrains using composite key

Posted on 2003-03-31
2
Medium Priority
?
203 Views
Last Modified: 2006-11-17
Hello!
I would like to know if anybody can help me with this.
I am trying to implement an unique constrains using composite key(two columns)
in Access 2000.
For Eg. I have a table called UserItem with Columns UserId and ItemId.
And the Relation between these two entities is many-to-many.
So in the table UserItem the combination of UserId and ItemId should be unique.
I do not know how to implement this composite key unique constrains in the Access table.

Any help is greatly appreciated.

Thanks in advance.

Vick
0
Comment
Question by:vipulaye
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 6

Accepted Solution

by:
TheAmigo earned 500 total points
ID: 8240353
In the table design view, you can select both fields UserID and ItemID, then clik on the primary key button in the toolbar.
0
 
LVL 18

Expert Comment

by:1William
ID: 9247413
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Accept question, points to TheAmigo
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

1William
EE Cleanup Volunteer
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question