entering data in one-to-many relationships

G

Guest

Simple question about entering data (connecting data) in a one-to-many
relationship.

I have one table for workshops.
I have another table for presenters.

Each one workshop could have many presenters, therefore I have set up the
presenters table with a foreign key (to link with the primary key from the
workshop table).

I've created the one-to-many relationship.

What I cannot figure out is how to "enter" data -- to be able to link the
presenters I have in the presenters table, with the workshops they are
presenting on.

I've tried setting up forms with subforms, but have had no luck.

How can I set this up so that I can easily add multiple presenters to be
tied to the workshops?

THanks.

michael munson
(e-mail address removed)
 
B

Bob W

Call table P presenters; table W as Workshops: create a two field table C
with field1 being a foreign key to table W and field2 being a foreign key to
table P. Set up a master form based on table W and a subformbased on table C
linked to the master form on field1. Set up a combo box in the suibform
with theControl Source Field2, Row Source table P and Bound Column where
ever you put the presenters primary key.in the presentation of the dropdown
for the combo box.
 
G

Guest

THank you.

I'm now stumped on how I can actually query the data so that I can list
details from table W and table P that are now connected via table C.

When I try to query using all three tables, I get an error stating that "The
SQL Statement could not be executed because it contains ambiguous outer
joins. To force one of the joins to be performed first, create a separate
query that performs the first join and then include that query in your SQL
statement."

(I don't know SQL)

I simply want to be able to e.g. print off a list of workshops with their
corresponding presenters, among other things.

Thank you for any guidance.

michael munson
(e-mail address removed)
 
J

John W. Vinson/MVP

tgwarrior said:
THank you.

I'm now stumped on how I can actually query the data so that I can list
details from table W and table P that are now connected via table C.

When I try to query using all three tables, I get an error stating that
"The
SQL Statement could not be executed because it contains ambiguous outer
joins.

Reread Bob's post. That's not what he suggested.

Use a Form with a Subform based on the joining table.

To force one of the joins to be performed first, create a separate
query that performs the first join and then include that query in your SQL
statement."

(I don't know SQL)

I simply want to be able to e.g. print off a list of workshops with their
corresponding presenters, among other things.

Don't use outer joins; use inner joins (the default). Add the W, C and P
table; join W to C by WorkshopID, and C to P by PresenterID. This query
will show all records where there are matches in all three tables (nothing
if any table has missing data though).

John W. Vinson/MVP
 

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