I have created a database that uses a menu form which selects difference subforms depending on the button click. That's no problem.
I've now been asked to update an existing database to be in the same format. This database has about 45 different forms so I can’t fit them all on a single menu besides which in many it's a cascade, you have to go from one form to the next which in the original database I achieve by simply opening the next form. So in the updated version I need to find a way to click on a button on the subform which closes that subform and opens another. Thus far the closest I can get is:
Expand|Select|Wrap|Line Numbers
- Private Sub Command8_Click()
- ‘ close the sub form
- DoCmd.Close
- ‘close the main form
- DoCmd.Close
- ‘Open the main form
- DoCmd.OpenForm "frmUIMain"
- ‘change the subform
- Dim strSourceSubForm As String
- strSourceSubForm = "frmUpdate"
- With Me!Child20
- .SourceObject = strSourceSubForm
- .LinkMasterFields = ""
- .LinkChildFields = ""
- .Requery
- End With
- End Sub
Thanks