Combobox based on selection in Another Combobox


G

Guest

I have a subform with two combioboxes. The first box "ActRegID' contains a
list of items. Once a seldction is made the second box "LegislationID" is
supposed to display only those items that refer to the ActRegID box.

This works fine when I use the Subform by itself, however when I try to use
the subfor from the Parent, I am asked to enter the criteria. Below is the
query that i have entered into the "RowSource" property of the LegislationID
field:

SELECT Legislation.LegislationID, Legislation.Section, Legislation.ActRegID
FROM Legislation WHERE
(((Legislation.ActRegID)=forms!WarningSubForm!ActRegID));


Can somebody please tell me what I am doing wrong?

Z
 
Ad

Advertisements

J

Jeff Boyce

Once you embed the subform within the main form, the "path" to the subform
control (the first combo box) is no longer ONLY the subform's name. You
need to include the parent form's name as part of the path ... something
like:

Forms!YourParentForm!YourSubformControlName.Form!YourSubformsFirstComboBox

Regards

Jeff Boyce
Microsoft Office/Access 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