rowsource on subform

B

Bill H.

how can I change the rowsource property on a subform based on a condition on
the parent form?

if it worked, I'd write it like this:

if me.ab=a then
me.subform.rowsource=strsql
endif

:)
 
R

Rick Brandt

Bill H. said:
how can I change the rowsource property on a subform based on a condition
on
the parent form?

if it worked, I'd write it like this:

if me.ab=a then
me.subform.rowsource=strsql
endif

Almost.

Me. NameOfSubformCONTROL.Form.RecordSource = strSQL
 
B

Bill H.

Hm. Not sure I understand.

the subform contains a combo box, and I want to change (or filter) the
selections that show up in the combo box, not the record source of the field
into which the combo box data will go.

so, if the name of the subform is Frm_subformA, and the control I want to
change is the rowsource. . .
 
R

Rick Brandt

Bill H. said:
Hm. Not sure I understand.

the subform contains a combo box, and I want to change (or filter) the
selections that show up in the combo box, not the record source of the field
into which the combo box data will go.

Me. NameOfSubformCONTROL.Form.ComboBoxName.RowSource = strSQL
 
Top