Help - subform question

  • Thread starter Thread starter Joe
  • Start date Start date
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
 
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,

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

.
 
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

.
 
Back
Top