Setting SourceObject for a SubForm

  • Thread starter Thread starter Harry
  • Start date Start date
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
 
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).
 
Back
Top