crazytrain506
Programmer
Hi,
I have a subform that I want to show on two different tabs. When on the first tab I want the subform view to be Datasheet and on the second tab to be in Continuous Form view. Is there a way for me to close the subform, edit the default view, and reopen it when changing from the first tab to the next? This is what I've got so far:
Private Sub mainform_eventTab2Clicked
DoCmd.Close acForm, "mysubform"
DoCmd.OpenForm "mysubform", acDesign, , , acFormPropertySettings, acHidden
mainform.Subform.Form.DefaultView = 1
End Sub
I have a subform that I want to show on two different tabs. When on the first tab I want the subform view to be Datasheet and on the second tab to be in Continuous Form view. Is there a way for me to close the subform, edit the default view, and reopen it when changing from the first tab to the next? This is what I've got so far:
Private Sub mainform_eventTab2Clicked
DoCmd.Close acForm, "mysubform"
DoCmd.OpenForm "mysubform", acDesign, , , acFormPropertySettings, acHidden
mainform.Subform.Form.DefaultView = 1
End Sub