Help with subform, again

N

Nathan Guill

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

Damon Heron

How about changing sourceobject and then just making it invisible?

Me.subContinuousSubform.SourceObject = ""
Me.subContinuousSubform.Visible = False


Damon
 
N

Nathan Guill

Duh, I'm sorry. In my code, I had the wrong name for the subform control.
I had sfrm in the code, but the control was named sbfSb. I changed that and
it works like it should.
 
M

Marshall Barton

Nathan said:
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.


Use a line of code to clear the subform's SourceObject
property:

Me.subform.SourceObject = ""

You may (or may not) want to also make the subform
invisible:

Me.subform.Visible = False
 

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