one-to-many relationships

A

Ava

Hello,

On my database, I have a table named "Prospects" (one)
and another named "Opprotunity" (many). I have always
assumed that when you have a one-to-many relationship
like this, you can have more than one Opprotunity entered
for every Prospect. When I try to test this theory out on
my DB, Access won't allow me to create more than one
Opprotunity per Propect. Am I doing something wrong? What
should I do?

Thank you so much,
Ava
 
A

Ava

Im sorry, "Opprotuniy" has Yes Duplicates OK
and "Prospects" has Yes No Duplicates. Both have the
primary key "Prospect ID" and Access won't let me change
the index in "Prospects" from No to OK. Sorry about the
mix up. What should I do?

Thanks,
Ava
 
H

Howard Brody

You have the ProspectID set as the Primary Key in both
tables - which means it won't allow duplicates. What you
want is:

tblProspects
ProspectID (PrimaryKey, Indexed, NoDuplicates)
tblOpportunities
ProspectID (Indexed, Duplicates OK)
OpportunityID (Indexed, Duplicates)
Either no PrimaryKey for this table or both fields as a
joint PrimaryKey.

And your Relationship:
[tblProspects].[ProspectID] (one) =
[tblOpportunities].[ProspectID] (many)

Hope this helps!

Howard Brody
 

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