G Guest Dec 7, 2004 #1 how do i make the label on a toggle button say "SHOW" when it is unpressed, and say "HIDE" when it is depressed? help, thanx.
how do i make the label on a toggle button say "SHOW" when it is unpressed, and say "HIDE" when it is depressed? help, thanx.
L Lynn Trapp Dec 7, 2004 #2 Put this in the Click event of the toggle button. If Me.YourToggleButton.Caption = "SHOW" Then Me.YourToggleButton.Caption = "HIDE" ELSE Me.YourToggleButton.Caption = "SHOW" End If
Put this in the Click event of the toggle button. If Me.YourToggleButton.Caption = "SHOW" Then Me.YourToggleButton.Caption = "HIDE" ELSE Me.YourToggleButton.Caption = "SHOW" End If
A Allen Browne Dec 7, 2004 #3 Use the AfterUpdate event procedure of the toggle button to change its Caption: Private Sub tgl1_AfterUpate() Me.tgl1.Caption = IIf(Me.tgl1.Value, "HIDE", "SHOW") End Sub
Use the AfterUpdate event procedure of the toggle button to change its Caption: Private Sub tgl1_AfterUpate() Me.tgl1.Caption = IIf(Me.tgl1.Value, "HIDE", "SHOW") End Sub
F fredg Dec 7, 2004 #4 how do i make the label on a toggle button say "SHOW" when it is unpressed, and say "HIDE" when it is depressed? help, thanx. Click to expand... Code the Toggle buttons Click event: If Me!ToggleName.Caption = "Show" then Me!ToggleName.Caption = "Hide" Else Me!ToggleName.Caption = "Show" End If
how do i make the label on a toggle button say "SHOW" when it is unpressed, and say "HIDE" when it is depressed? help, thanx. Click to expand... Code the Toggle buttons Click event: If Me!ToggleName.Caption = "Show" then Me!ToggleName.Caption = "Hide" Else Me!ToggleName.Caption = "Show" End If