Solved

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

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Familiarize people with the process of utilizing SQL Server stored procedures 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 Micr…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

829 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