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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Visible controls from a check box 2

Status
Not open for further replies.

gRegulator

Technical User
Jul 3, 2003
133
CA
Hi everyone,

How do I go about making controls visible/invisible based upon if a check box is checked or not?

e.g.

If check1 is checked then i want label 1 to be visible, if not checked, then i want label 2 to be visible. Can someone please help me on this? Thanks so much!

 
How are ya 702-1062985 . . . . .
Code:
[blue]   Me!ControlName.Visible = [purple][b]False[/b][/purple] [green]'To Hide[/green]
   Me!ControlName.Visible = [purple][b]True[/b][/purple][green]'To Show[/green][/blue]
[purple]Remember: You can't hide a control if it has the focus . . .[/purple]

Calvin.gif
See Ya! . . . . . .
 
Hi!

If you want the fields visible when the check box is checked and invisible when it is not, do this in the After Update Event of the check box and in the Current event of the form:

YourControl.Visible = YourCheckBox.Value

hth


Jeff Bridgham
bridgham@purdue.edu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top