473,396 Members | 2,111 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,396 software developers and data experts.

To Enable combobox with CheckBox

I want to do the following
1) I have two checkbox having value 0 and 1 ,and when i select any of these checkbox ,then simultaneously the corresponding value of the combobox1 shoould be selected and when the value 0 is selected then combobox2 becmoes active and if value 1 is selected then combobox2 is disabled. And If i deselect any of the checkbox then everything should be reset
May 30 '13 #1
1 2330
zmbd
5,501 Expert Mod 4TB
Simple answer:

On a form you have:
- two check boxes: ChkBxOne and ChkBxTwo
- two combo boxes: cboOne and cboTwo

--
In anycase, you will need to use either the onchange or onupdate events of the chkBx* to run code that will enable or disable the cbo* based upon current chkBx* state.
--

To provide better answer:

Please clarify:

On the intial opening of the form: It appears that cboOne and cboTwo are not available

On the intial opening of the form: It appears that ChkBxOne and ChkBxTwo are both available and in a non-checked/selected state (the box does not have a check mark).

Your desired actions are something like this:

When the user selects ChkBxOne then cboOne should be enabled and cboOne should receive focus. Otherwise cboOne is not available to the user.

Toggling the state of ChkBxOne also toggles state of cboOne

When the user selects ChkBxTwo then cboTwo should be enabled and cboTwo should receive focus. Otherwise cboTwo is not available to the user.

Toggling the state of ChkBxTwo also toggles state of cboTwo

What is not clear is if there is also an interaction between ChkBxOne and cboTwo; and ChkBxTwo and cboOne.

I will also need to see your code - I rarely will provide a completed code as Bytes is neither a code writing nor homework service.


-z
May 30 '13 #2

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

Similar topics

4
by: David Morgan | last post by:
Hi This is a really weird problem. We have a website that has been running for about six months with no problems. We have recently moved it to a new server with a new ISP. The server is of a...
7
by: Nicolae Fieraru | last post by:
Hi All, I am trying to change the rowsource of a combobox when I click on it. I played with many events, associated with the form and the combobox, but still haven't figured out what is the way...
5
by: Greg Dunn | last post by:
I have two tables in a parent-child relationship. Details on the tables are as shown below: Table1 ------- Item_ID (primary key) Item_Owner (foreign key to Table2) Table2 -------
30
by: dbuchanan | last post by:
ComboBox databindng Problem == How the ComboBox is setup and used: My comboBox is populated by a lookup table. The ValueMember is the lookup table's Id and the DisplayMember is the text from a...
1
by: K B | last post by:
I just installed VS 2005...both GridView and DetailsView, I'm using a SQLdataSource and both controls do NOT have a checkbox for Enable Editing. Help please!!! Thanks, Kit
6
by: tshad | last post by:
I am trying to disable and enable a checkbox from javascript. The problem is that if the checkbox starts out as: <input id="Override" type="checkbox" name="Override"/> I can change it back...
9
by: Franky | last post by:
I have a usercontrol that inherits from ComboBox I'd like to add the feature that the user can delete any item Best would be that he could right click an element and a messagebox would ask if...
5
by: GoGs | last post by:
How can put checkBox in comboBox... Thanks -- GoGs
1
by: Thuveshen | last post by:
Hi There I am new to VB scripting in MS Access. I currently have a form with a subform embedded in it. I run a query based on search criteria which works fine. Within the Subform there is a...
1
by: josef01 | last post by:
I want to store data’s in selected sheet from drop down menu in userform .Suppose if I select sheet 1 data should be stored in sheet1 if I select sheet2 data’s should be stored in sheet2 . With the...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.