473,413 Members | 1,764 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

How do I display additional hidden choices when a selection is made?

5
I am creating a form for users to submit computer acess. I have several choices for them to choose, however depending on the choice there are hidden options that I want to have display for them to choose from too. In the property sheet I have those lables hidden so that they don't display on the main form. How to I get them to display when a primary choice is made?
Sep 30 '11 #1
10 1429
patjones
931 Expert 512MB
This is something that you need to use a little bit of VBA code for. What kind of control are you using for the choices? (e.g. option group, combo box, etc.)

Pat
Sep 30 '11 #2
dap6c6
5
Thanks..I am using a check box control.
Sep 30 '11 #3
patjones
931 Expert 512MB
OK, speaking generally, suppose you have a check box called chk and a label called lbl. In the On Click event for the check box, this code will achieve what you're looking for:

Expand|Select|Wrap|Line Numbers
  1. Private Sub chk_Click()
  2.  
  3. Me.lbl.Visible = Me.chk
  4.  
  5. End Sub

The Visible property for a label can be either TRUE or FALSE, and the check box status of checked or unchecked corresponds to these boolean values respectively.

Pat
Sep 30 '11 #4
dap6c6
5
I'm sorry but that didn't work for me...
Sep 30 '11 #5
patjones
931 Expert 512MB
Can you post the code that you used?
Sep 30 '11 #6
dap6c6
5
Expand|Select|Wrap|Line Numbers
  1. Private Sub Check48_Click()
  2.  
  3. Me.Check73.Visible = Me.Check48
  4. Me.Lable74.Visible = Me.Check48
  5.  
  6. End Sub
Sep 30 '11 #7
NeoPa
32,556 Expert Mod 16PB
I would suggest the AfterUpdate event might be a more reliable one to use. Otherwise I have no idea what the question is about. I'm assuming Pat does. If not, remember it's easier to deal with questions that don't make sense by reporting them for clear-up.
Sep 30 '11 #8
patjones
931 Expert 512MB
Is your control name really "Lable74" or is it "Label74"? Also make sure that you compiled and saved the code prior to returning to the form and trying it.

You can also try AfterUpdate as NeoPa suggests; however, I did test this in my sandbox database and found that it works. So I'm not sure off the top of my head what else could be the issue.
Sep 30 '11 #9
patjones
931 Expert 512MB
Did we resolve the first issue for you? If so I would suggest a new thread for this question as it is not related to the original topic. Thanks.
Oct 4 '11 #10
dap6c6
5
Yes, thank you I had a typo...
Oct 4 '11 #11

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: middletree | last post by:
I had this going yesterday, but it seems to be forgotten because it's so far down the list now. www.middletree.net/dropdown.htm This is from an Intranet app I have going in ASP. I have no...
33
by: Nigel Molesworth | last post by:
I've Googled, but can't find what I need, perhaps I asking the wrong question! I want a "FAQ" page on a web site, I hate those pages that scroll you to the answer so and I figured that a good...
1
by: Amit | last post by:
How do I display a confirmation dialog when the user tries to delete a row? When the user selects a row in the DataGridView and hits the delete key Thanks, Amit
2
by: kennygee | last post by:
I am trying to learn VB after many years programming in Access. I am trying to do something in VB that is simple in Access. How do I display record data on a form based on the selection made in a...
2
by: subbaraju | last post by:
I have two selection controls and based on the selection made by the user i need to pass those values to the other program in java...... can u give me the way......
8
by: manishamca | last post by:
i want to retrive values from backend depending on the selection made in choice box. i have two choice box and different values shuld be retrived depending on the selection made in this two...
7
by: ammweb | last post by:
How would you validate a page that had several drop down menus. When the submit button is submitted, and NO selection has been made? See code below: <html> <head> </head> <body> <table...
0
by: watchec | last post by:
What can you expect in terms of styles and choices when you choose men's corporate polo shirts? Colors - These colors are going to be specifically geared towards the man. This does not mean you...
5
Claus Mygind
by: Claus Mygind | last post by:
I have a list box and want to limit the user to selecting a max of 5 items from the list. I've put in a counter which warns the user that more than 5 items have been selected, however I cannot...
2
by: ash42 | last post by:
I need to write an asp application consisting of a webform which allows a user to make a selection from menu and display all jobs relalted to IT or all jobs related to Admin . A user will click...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.