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
 

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

Back
Top