How to refer to a control on the child form?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
Can anyone tell me how to refer to a ComboBox on my child form from my main
form, I write the following codes in a Command button on my main form and it
doesn't work.

Me!MyChildFrom.cbxItem.Datasource = ‘1;2;3;’

Thank you
 
Try:
Me!MyChildFrom.Form.cbxItem ...

If the .Form bit is new, see:
Referring to Controls on a Subform
at:
http://allenbrowne.com/casu-04.html

Also, be aware that the subform control may have a different name than the
form that is loaded into it (its SourceObject.)
 
hi Jeff,
Can anyone tell me how to refer to a ComboBox on my child form from my main
form, I write the following codes in a Command button on my main form and it
doesn't work.

Me!MyChildFrom.cbxItem.Datasource = ‘1;2;3;’
You have to use the subform control name, not the name of the (sub-)form
itself.


mfG
--> stefan <--
 
Back
Top