Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Toggle between subforms

Status
Not open for further replies.

rdc1963

Technical User
Jul 22, 2002
5
GB
I want a command button to toggle between 2 subforms ( both derived from the ame recordset) - any ideas. I've tried without success
 
I'm assuming you mean you want to be able to view one or other of the sub forms.

If this is the case....

Put both sub forms on your form, one on top of the other. set the visible property of one of them to false.

in your command button click do

Private Sub cmdToggle_Click()
If frmSubOne.Visible Then
frmSubOne.Visible = False
frmSubTwo.Visible = True
Else
frmSubOne.Visible = True
frmSubTwo.Visible = False
End If
End Sub

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top