calling new subform

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have a form with a subform. I would like to start with the subform blank
for each new record and have a new form displayed based on a selection from a
combo box, any ideas how to go about doing this?
 
In the AfterUpdate event procedure of the combo box, set the SourceObject
property of the subform control to the name of the form you want displayed.
For example ...

Private Sub TestCombo_AfterUpdate()

Select Case Me.TestCombo
Case "One"
Me.TestSubform.SourceObject = "frmOne"
Case "Two"
Me.TestSubform.SourceObject = "frmTwo"
Case Else
Me.TestSubform.SourceObject = vbNullString
End Select

End Sub
 
Back
Top