Setting SourceObject for a SubForm

H

Harry

I have an unbound subform in which I want to set its
source object to another bound form or bound subform
depending on the selection in a combo box which triggers
the afterUpdate event

The code I am useing in the afterUpdate event for the
combo box is

Me.subForm.SourceObject = subOtherSubForm

Result is nothing - the source object is not updated with
subOtherSubForm

Thanks

Harry
 
S

Scott McDaniel

Make sure that the name of your subform CONTROL is "subForm" ... also, is
the subform that you are attempting to open related to your main form? If
so, you'll have to set the Link fields (Child and Master) in order for your
data to appear properly. If they are not, make SURE that you set the Link
fields to nothing (like = vbNullString).
 

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