473,513 Members | 2,881 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

fill combo based on values other combo's

64 New Member
Hi,

I have 10 combo boxes called

cbo_wens1 to cbo_wens10
The Rowsource for all the combo's is the same;

Expand|Select|Wrap|Line Numbers
  1. SELECT Q_wensen.ID_wens, Q_wensen.variabele FROM Q_wensen
;

However if a item in cbo_wens1 is selected, the list of possibilities in the other nine comboboxes must be without the selected item in cbo_wens1.

When the user selects the dropdown of combox cbo_wens2, the user shouls only see items that have not been selected in one of the other comboboxes.

Any help is really appreciated !
Regards,
Pierkes
Jul 16 '14 #1
1 1023
twinnyfo
3,653 Recognized Expert Moderator Specialist
There are many threads on this forum which discuss this same exact issue (although not with multiple Combo Boxes). Please see those for basics.

The solution is to simply add VBA to the AfterUpdate event of the Combo box which creates the row source for the following combo box. Then assign thaat SQL string to the combo box, requery it and wait for the next action.

I would also disable combo boxes 2-10, and include code in the same event to enable the next combo box.

This is relatively "simple" but complex, because you have to keep adding the values of each combo box in your next row source. But, it can be done.
Jul 16 '14 #2

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

Similar topics

3
2195
by: Antoine Janssen | last post by:
hi, I would like to create two combo boxes. In the first one you can select a user in the second one you can select a project. To simplify the selection i would like to shorten the project list by just presenting the projects the selected user is working on (using a where clause with the userid filled in). Does onyone know how to achieve...
1
7413
by: dthmtlgod | last post by:
I have a form on my webpage. There are many comboboxes. One of them is where a user can select a "State". Based on the state, I want to select a "County". The form should populate only the counties that apply to that State I know how to do the JOIN if needed, but not quite sure how to pass the value of the "State" combobox to the...
0
1538
by: CanFlightSim | last post by:
I use combo boxes and a great little piece of code to fill a form with a record set. For example I want to search by Lastname and fill the form or by company and fill the form, I will start typing the last name in a combo and it fills ... press enter and the form fields load. 'Find the record that matches the pick. Private Sub...
2
1500
by: Ausclad | last post by:
Hi, I have a combo box that I want to populate, based on the selection of another combo box. So when combo box A is selected, combo box B is populated with related values. I have this all working fine, except for on the forms loading. I have combobox B being populated after combobox A_SelectedIndexChanged event fires. However, on the...
2
12420
by: Eric Layman | last post by:
Hi, I have a radio button and a combo box. Upon changing a value for radio button, the combo box values will be dynamically updated. I have an idea on how to go abt doing it but Im stuck into converting into code.
33
5485
by: buss123 | last post by:
Hi all, combo box script code was working in IE perfectly with all modes but OnChange event was not working in FireFox(editable mode, if we select valuese that combo box values r not dislaying if enter the data the it is inserting properly) javascript code follows pls help me to solve this problem function...
2
4206
by: MyWaterloo | last post by:
Ok. I have a form with a field for a sampler's name, number, and email address. The sampler's name is selected from a combo box that references a table with name, number, and email. I want to be able select the name in the combo box and have the fields for the phone number and email address fill with the selected sampler's info. I have tried...
3
1194
by: Newbie23 | last post by:
Hello, Am I able to change the values available in a combo box based on what value is selected in another combo box? For example, my form is to add a serviable appliance record, i.e. Boiler , Fire. I have a combo box to choose which type of a appliance, but then once is selected I want the next combo box to choose a manufacturer....
1
2244
by: dekk | last post by:
Hi, I have a main form ("frm_TimeParent") and a subform ("frm_TimeChild"). Issue: How do I refresh the combo box values in the subform once the contract has been selected in the main form? Background: The main form has a combo box ("cbo_Contract") which obtain data from a QUERY ( SELECT ., . FROM tbl_Contract; ) and has a control...
3
1356
by: sandeepRR | last post by:
Hi, I want to clear th combo-box values on selection of new value in other combobox. could anyone please help. !! SAndeep
0
7269
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7394
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7123
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5701
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5100
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4756
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3248
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
1611
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
470
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.