How can I keep a person from being assigned to a project twice

E

elillis

I have 3 tables: People, Projects, People\Projects.
Table People\Projects kepts track of the people assigned to a project. How
can I keep a person from being assigned to a project twice.
 
L

Lynn Trapp

It shouldn't, if it is a compound unique index. Under the situation I
described you should be able to see something like this in your
People_Projects table

People_ID Project_ID
1 1
2 1
1 2
2 2
2 3

All of those are unique records and, as you can see, People_ID 1 is tied to
2 projects and People_ID 2 is tied to 3 projects.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conradsystems/accessjunkie.html
 
E

elillis

I must be doing something wrong.
I get a duplicate indication error when I try to enter the second record.
I put yes (no duplicates) in thje indexed field.

--Ed
 

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

Top