Help with subform

  • Thread starter Thread starter Nathan Guill
  • Start date Start date
N

Nathan Guill

I am toying with the idea of having a subform in my switchboard. This
subform would be unbound until a menu item was selected that changed its
sourceobject. What I want to know is if there is a way for the
(sourceobject)form to tell that is is being used as a subform and then
unbind from the parent form? This is so that I can use the same forms and
controls if the form is used as a subform or as a full form depending on how
it was called.
 
One way: Test for Me.Parent. It will raise an error (2452) if Me doesn't
refer to a form currently being used as a subform.

Then you can set the form's Recordsource, etc., based on the results of that
test.
 
Thank you. That's what I was looking for.

George Nicholson said:
One way: Test for Me.Parent. It will raise an error (2452) if Me doesn't
refer to a form currently being used as a subform.

Then you can set the form's Recordsource, etc., based on the results of that
test.
 
Well, I was able to test for the parent, but how do I unbind the
sourceobject in a subform while the form is open? Basically, I want to be
able to "close" the subform. Is this possible?
 
Back
Top