Solved

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

Posted on 2008-06-19
3
179 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 119

Expert Comment

by:Rey Obrero
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
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.

747 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now