Sub-forms - closing/opening

  • Thread starter Thread starter Mat
  • Start date Start date
M

Mat

I have a subform with controls on it. These controls will
close the subform and load another subform in its place.
However, I can't get the code to work - I would think it
was this syntax, but it does not work:
Me.subform2.SourceObject = "frmsubform2"
Anyone help on how to do this ? Thanks for any
suggestions.
 
Mat said:
I have a subform with controls on it. These controls will
close the subform and load another subform in its place.
However, I can't get the code to work - I would think it
was this syntax, but it does not work:
Me.subform2.SourceObject = "frmsubform2"
Anyone help on how to do this ? Thanks for any
suggestions.

If the controls are on the subform, then Me doesn't refer to the parent
form, it refers to the subform itself, which probably doesn't contain
the "subform2" control. Can you put the subform-swapping controls on
the main form instead?
 
Back
Top