Help - subform question

J

Joe

I am building a form with a subform that
will allow me to do the following:

I have two tables: Agency and Volunteer. Agency
contains an AgencyID column (it's promary key) and
Volunteer contains a VolunteerID column (as it's primary
key). I also have a cross refernce table whose columns
are AgencyID and VolunteerID. This matches up agencies
with volunteers.

I now have a form that is supposed to allow
people to choose an agency (from a dropdown box)
and see all of the volunteers working at that agency.

The problem that I am having is setting up the
subform for the volunteers. I am stuck. How do I
set up the subform so that I use the cross
reference table to link the agencies with the
volunteers? Any help would be greatly appreciated.

Thank you,

Joe
 
S

Sandra Daigle

Hi Joe,

The recordsource of the subform should be the third table (AgencyStaff? with
AgencyId and VolunteerID). Then on the subform, you would have a combo for
VolunteerId which uses a query on the Volunteers for its rowsource. The
important thing to understand is that the VolunteerId control in the subform
is bound to the third table.
 
G

Guest

Sandra,

Thank you. If I want to display the subform in datasheet
view, will this still work?

Joe
-----Original Message-----
Hi Joe,

The recordsource of the subform should be the third table (AgencyStaff? with
AgencyId and VolunteerID). Then on the subform, you would have a combo for
VolunteerId which uses a query on the Volunteers for its rowsource. The
important thing to understand is that the VolunteerId control in the subform
is bound to the third table.

--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.

I am building a form with a subform that
will allow me to do the following:

I have two tables: Agency and Volunteer. Agency
contains an AgencyID column (it's promary key) and
Volunteer contains a VolunteerID column (as it's primary
key). I also have a cross refernce table whose columns
are AgencyID and VolunteerID. This matches up agencies
with volunteers.

I now have a form that is supposed to allow
people to choose an agency (from a dropdown box)
and see all of the volunteers working at that agency.

The problem that I am having is setting up the
subform for the volunteers. I am stuck. How do I
set up the subform so that I use the cross
reference table to link the agencies with the
volunteers? Any help would be greatly appreciated.

Thank you,

Joe

.
 
S

Sandra Daigle

Yes - you shouldn't have any problems with it.

--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.


Sandra,

Thank you. If I want to display the subform in datasheet
view, will this still work?

Joe
-----Original Message-----
Hi Joe,

The recordsource of the subform should be the third table
(AgencyStaff? with AgencyId and VolunteerID). Then on the subform,
you would have a combo for VolunteerId which uses a query on the
Volunteers for its rowsource. The important thing to understand is
that the VolunteerId control in the subform is bound to the third
table.

--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.

I am building a form with a subform that
will allow me to do the following:

I have two tables: Agency and Volunteer. Agency
contains an AgencyID column (it's promary key) and
Volunteer contains a VolunteerID column (as it's primary
key). I also have a cross refernce table whose columns
are AgencyID and VolunteerID. This matches up agencies
with volunteers.

I now have a form that is supposed to allow
people to choose an agency (from a dropdown box)
and see all of the volunteers working at that agency.

The problem that I am having is setting up the
subform for the volunteers. I am stuck. How do I
set up the subform so that I use the cross
reference table to link the agencies with the
volunteers? Any help would be greatly appreciated.

Thank you,

Joe

.
 

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