webvine
Technical User
- Oct 21, 2002
- 20
Hello,
I have 3 subforms that I would like to access using a Toggle Button Control, I can get it to work with 2 subforms - clicking the toggle button it will display 2 subforms going back and forth between the two, but I really would like to use this toggle button to display 3 subforms. I have played around with the code and I can manage to get it to display the 3 subforms going through a cycle once, but then I cannot click the toggle button anymore to re-pick a subform. Below is the code that I have so far...any suggestions? Thanks in advance.
Private Sub ToggleSubform_Click()
If Me![ToggleSubform].Caption = "&View Cracks Count" Then
Me![subfrmCount Windows].Visible = False
Me![subfrmCount Stains].Visible = False
Me![subfrmCount Cracks].Visible = True
Me![ToggleSubform].Caption = "&View Windows Count"
Me![ToggleSubform].Caption = "&View Stains Count"
Else
Me![subfrmCount Cracks].Visible = False
Me![subfrmCount Stains].Visible = True
Me![ToggleSubform].Caption = "&View Stains Count"
Me![ToggleSubform].Caption = "&View Windows Count"
End If
End Sub
I have 3 subforms that I would like to access using a Toggle Button Control, I can get it to work with 2 subforms - clicking the toggle button it will display 2 subforms going back and forth between the two, but I really would like to use this toggle button to display 3 subforms. I have played around with the code and I can manage to get it to display the 3 subforms going through a cycle once, but then I cannot click the toggle button anymore to re-pick a subform. Below is the code that I have so far...any suggestions? Thanks in advance.
Private Sub ToggleSubform_Click()
If Me![ToggleSubform].Caption = "&View Cracks Count" Then
Me![subfrmCount Windows].Visible = False
Me![subfrmCount Stains].Visible = False
Me![subfrmCount Cracks].Visible = True
Me![ToggleSubform].Caption = "&View Windows Count"
Me![ToggleSubform].Caption = "&View Stains Count"
Else
Me![subfrmCount Cracks].Visible = False
Me![subfrmCount Stains].Visible = True
Me![ToggleSubform].Caption = "&View Stains Count"
Me![ToggleSubform].Caption = "&View Windows Count"
End If
End Sub