subform parameter input not linking properly

  • Thread starter Thread starter gestalt_98
  • Start date Start date
G

gestalt_98

I have a cascading product picker that relates 5 categories each
providing a pick list related to a previous parameter. The picker
works when placed in a form by itself, but the parameter doesnt pass
when the combo-boxes are nested within the subform. I am currently
passing sql with the following language:

SELECT allWithIDs.cat05 FROM allWithIDs WHERE
(((allWithIDs.Product_family)="Drapery") And
((allWithIDs.Product_Type)=Forms!SODetail_drapery_entry_subform!Product_Type)
And ((allWithIDs.cat01)=Forms!SODetail_drapery_entry_subform!cat01) And
((allWithIDs.cat02)=Forms!SODetail_drapery_entry_subform!cat02) And
((allWithIDs.cat03)=Forms!SODetail_drapery_entry_subform!cat03) And
((allWithIDs.cat04)=Forms!SODetail_drapery_entry_subform!cat04)) GROUP
BY allWithIDs.cat05;

When the main form is live I get a parameter dialogue, meaning the
parameter wasn't passed. should the logic look more like:

Forms![MAIN_FORM]!SODetail_drapery_entry_subform!cat01

instead of Forms!SODetail_drapery_entry_subform!cat01

??

Any responses would be much appreciated.

lc
 
first, open the main form in design view. click once on the subform to
select it; what you're actually selecting is the subform *control* within
the main form, which is a "container" control that holds the subform object.
having selected the subform control, look at the Name property, and make
sure you refer to that name in your criteria expressions, as

Forms![MAIN_FORM]![NameOfSubformControl].[Form]![cat01]

the above goes all on one line in the query criteria, of course.

hth
 

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

Back
Top