Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Load instance of a subform

Status
Not open for further replies.

BayouC

Technical User
Jan 16, 2009
2
US
Greetings Access guru's,

I have a form with nested subforms that I provide recordsource and control settings to at runtime. My problem is that I cannot get the subforms to load - so as a result I cannot modify their control parameters.

For example:
Dim frm as new frmMainForm
with Frm
.recordsource = blabla
.subformCtl.sourceobject = blabla
.subformCtl.form.recordsource = THIS DOES NOT WORK

because the subform has not been loaded. I've discovered I can get it to load if I set the frmMainForm expandsubdatasheet to yes, but then it still fails at the second level:
.subformCtl.form.subformCtl2.form is not an object

Any suggestions?


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top