Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2008-06-19
3
Medium Priority
?
188 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 1000 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

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

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

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
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.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Suggested Courses

877 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