Query for values in a combo box on a subform

J

jubu

Access 2000.
Brief overview of database: Family table connected to Child table using
FamilyID (one to many); also connected to a Service information table using
FamilyID (one to many). I have a main form for family information with
several subforms.

The Service subform (continuous form) has a combo box for a name field where
the user selects the first name of the appropriate child for which the
service is provided. Since the subform is linked to the main form using the
FamilyID, I would like the combo box to use that FamilyID to populate the
combo box with only the names of the children for that family and change
automatically as they move to a different family record.

I have tried the filter and requery suggestions from
www.mvps.org/access/forms/frm0028.htm but with no success. Is it because I
am in a subform? Any ideas would be GREATLY appreciated.

TIA

jubu
 
K

KARL DEWEY

Use a query as source for combo box.

Query criteria --
[Forms]![YourMainForm]![FamilyID]
 
J

jubu

I have a query with the criteria as you suggested, but the combo box values
do not change as I move from one family record to another. Is there
something else I need to do to make the query update with each record?
--
jubu


KARL DEWEY said:
Use a query as source for combo box.

Query criteria --
[Forms]![YourMainForm]![FamilyID]

jubu said:
Access 2000.
Brief overview of database: Family table connected to Child table using
FamilyID (one to many); also connected to a Service information table using
FamilyID (one to many). I have a main form for family information with
several subforms.

The Service subform (continuous form) has a combo box for a name field where
the user selects the first name of the appropriate child for which the
service is provided. Since the subform is linked to the main form using the
FamilyID, I would like the combo box to use that FamilyID to populate the
combo box with only the names of the children for that family and change
automatically as they move to a different family record.

I have tried the filter and requery suggestions from
www.mvps.org/access/forms/frm0028.htm but with no success. Is it because I
am in a subform? Any ideas would be GREATLY appreciated.

TIA

jubu
 
K

KARL DEWEY

In design view click on properties. Build and list a macro for FamilyID "On
Change" to refresh the query.

jubu said:
I have a query with the criteria as you suggested, but the combo box values
do not change as I move from one family record to another. Is there
something else I need to do to make the query update with each record?
--
jubu


KARL DEWEY said:
Use a query as source for combo box.

Query criteria --
[Forms]![YourMainForm]![FamilyID]

jubu said:
Access 2000.
Brief overview of database: Family table connected to Child table using
FamilyID (one to many); also connected to a Service information table using
FamilyID (one to many). I have a main form for family information with
several subforms.

The Service subform (continuous form) has a combo box for a name field where
the user selects the first name of the appropriate child for which the
service is provided. Since the subform is linked to the main form using the
FamilyID, I would like the combo box to use that FamilyID to populate the
combo box with only the names of the children for that family and change
automatically as they move to a different family record.

I have tried the filter and requery suggestions from
www.mvps.org/access/forms/frm0028.htm but with no success. Is it because I
am in a subform? Any ideas would be GREATLY appreciated.

TIA

jubu
 

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