open subform

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

Guest

I have a form with several unbound subforms. I want to pass in a string value
specifying the subform I wish to load on opening the form.

If the variable holding that value is FormToOpen, how do I set the form? The
following doesn't work:

set frm= Me.FormToOpen.Form

What is the syntax?
Thanks again!!
 
smk23 said:
I have a form with several unbound subforms. I want to pass in a string value
specifying the subform I wish to load on opening the form.

If the variable holding that value is FormToOpen, how do I set the form? The
following doesn't work:

set frm= Me.FormToOpen.Form

What is the syntax?


That's kind of vague so I'm not sure what you trying to do.

I think you might want to set the subform **control**
SourceObject property to the name of the form:

Me.subformcontrol.SourceObject = FormToOpen
 
Back
Top