Sub-forms - closing/opening

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.
 
D

Dirk Goldgar

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?
 
P

Perry

Have you tried to refresh the subform as in

Me.subform2.form.refresh

Krgrds,
Perry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top