Solved

How do I change the visibility of a Label and Textbox after a Yes/No Option?

Posted on 2008-06-19
3
183 Views
Last Modified: 2013-11-28
Hello Experts!!!

I have a Form, on the Form, I have a check box (ItemsReceived).  When the box is checked, I want a Label & Text box to pop up (Label20, DateItemsReceived).
How do I set the visibility for both label and textbox to be set when the check box is checked?  Also, would it be easy to add a few more labels and text boxes later on?

Thanks for all your help!!!!!!  
0
Comment
Question by:MissC_9880
3 Comments
 
LVL 4

Accepted Solution

by:
Tirocupidus earned 250 total points
ID: 21825260
In the OnClick event of the checkbox, you would use the code I'm posting. If the label is the one associated with the textbox, then you can delete the line for it since hiding a control will automatically hide its associated label.
Me.Label20.Visible = Me.checkbox
Me.DateItemsReceived.Visible = Me.checkbox

Open in new window

0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 21825275
in the click or change or afterupdate  event  of the check box

private sub chkbox_click()


me.label20.visible=(me.chkbox=true)
me.DateItemsreceived.visible=(me.chkbox=true)

end sub
0
 

Author Closing Comment

by:MissC_9880
ID: 31468931
Worked perfectely!!!  Thanks so much for your help and your quick response!!!
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question