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

  • Thread starter Thread starter elillis
  • Start date Start date
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.
 
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
 
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
 
Back
Top