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
 
should the logic look more like:

Forms![MAIN_FORM]!SODetail_drapery_entry_subform!cat01

instead of Forms!SODetail_drapery_entry_subform!cat01

Yes, or to be more verbose and perhaps less ambiguous:

Forms![MAIN_FORM]!SODetail_drapery_entry_subform.Form!cat01

This assumes that the Name property of the subform control on
MAIN_FORM is in fact SODetail_drapery_entry_subform - the Subform
Control's Name property is the needed one, the name of the form within
that control is not used.

John W. Vinson[MVP]
 
Okay, John, thank you for the post, your response is corroborated by
other posts in the forum, however I am still not getting a parameter
past, even with the naming explicitly

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

I am going to rebuild the whole form from scratch to determine if there
are other problems that may be causing this.

Thanks for the response.

lc
John said:
should the logic look more like:

Forms![MAIN_FORM]!SODetail_drapery_entry_subform!cat01

instead of Forms!SODetail_drapery_entry_subform!cat01

Yes, or to be more verbose and perhaps less ambiguous:

Forms![MAIN_FORM]!SODetail_drapery_entry_subform.Form!cat01

This assumes that the Name property of the subform control on
MAIN_FORM is in fact SODetail_drapery_entry_subform - the Subform
Control's Name property is the needed one, the name of the form within
that control is not used.

John W. Vinson[MVP]
 
Back
Top