473,765 Members | 2,081 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

union query - populate combo boxes

65 New Member
i know there is a way to populate one combobox based on another, but i've never done it myself and am looking for some help.

i have a table that has SwitchNo and NumberofPorts as two columns. i want to create a union query to display the correct numberofports for the selected switch in switchno.


ex)
SwitchNo - 1
Numberofports - 24

switchno - 2
numberofports - 5

cbo1 (switchno) = 1
cbo2 (portno) = (populate with ports 1-24)

cbo1 (switchno) = 2
cbo2 (portno) = (populate with ports 1-5)
Jan 4 '07 #1
2 2030
cansnowboard
3 New Member
http://www.fontstuff.com/access/acctut10.htm

Cascading Lists for Access Forms
Combo Boxes and List Boxes are popular tools for both assisting the user and controlling data input. Their functionality can be enhanced by changing the contents of the list depending on circumstances. For example, the user makes a choice from one list which causes the contents of another list to change. This concept of cascading or interdependent lists is quite easy to put into practice with a little VBA programming.

This tutorial demonstrates several different ways to create cascading lists on your Access forms. I will use combo boxes, rather than list boxes, as the latter have a more specific purpose (to allow the user to make multiple selections).

If you are new to form building, or have not ever put a combo box on to a form, have a look at a step-by-step tutorial first.
Jan 4 '07 #2
NeoPa
32,572 Recognized Expert Moderator MVP
I had a (quick) look at the link and it seems to have what you need - and very well laid out and explained too.
Let us know if you have any questions it doesn't answer.
I would direct others to this link too - it's worth reading through to get a feeling for how it works.
Jan 5 '07 #3

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

Similar topics

0
1676
by: Joyce | last post by:
The XML Schema design problem to solve is as follows: We have 2 combo boxes to populate from schema data, let's say: 1. States 2. Cities (and this one gets populated depending on the choice of the state) The event management is no problem, the question is, how do we build our XML Schema (that's going to contain the data for both states and
4
2608
by: RBohannon | last post by:
I'm using Access 2000. I currently have a report being generated using the results of a query by form. The form used for this query is an unbound form, frmListDialog. frmListDialog contains two unbound text boxes, txtExamTitle and txtExamNumber. The user enters either the exam title in txtExamTitle or the exam number in txtExamNumber as a parameter for the query. This is currently working fine, however because the exam titles are...
4
7192
by: meganrobertson22 | last post by:
Hi Everyone- I have a question about how to add and then use the "All" selection in a combo box. I am trying to figure out how to: (1) add "All" as a selection to a combo box and then (2) how to use the selection "All" as criteria for a field in a query, which is used to generate data for a report.
3
2273
by: Stig | last post by:
Hi, Any help on this one will be greatly appreciated as I have spent too long banging my head against the screen trying to get it sorted. Basically I would like to have a select all records option in a combo box that is used in an unbound form for my report parameter. I have tried to explain it in further detail below: - In my DB I have numerous forms are used to input details into a table (TblMasterTable).
5
3702
by: jjyconsulting | last post by:
Newbie needing some help. I have a tblParticipants. The fields include gender, education_level, income, occupation etc., I'm trying to create a form where a user can run a query from the form and just choose the appropriate criterias from the combo boxes to get the results. I also want the query to run even if there is not a value in all the combo boxes ie., i want just all males with income level of over $100,000...Any insights or help...
1
1873
by: commodityintelligence | last post by:
Greetings, I am merging a series of different tables into one query to export decision-making information. I have some architecture issues I need to ask for help on. I have no programming training. I will explain my structure before asking my questions. I have data from a table (updated monthly by adding the most current month’s data) that is evaluated by certain arithmetic, given an adjective to describe it, and then being exported...
23
5259
by: Ciara9 | last post by:
I have a table of static values that I am acessing from another table to populate combo boxes. Next I have a form where this information is selected by the user and updates directly to the table. Everything works fine. I can create simple queries and reports with no problem as well as update the data. If I try to add any criteria, even as simple as using "like" to identify a value in a field of the table that has been populated by the combo...
4
1614
kcdoell
by: kcdoell | last post by:
I have a form (Form1) that displays records based on 3 unbound combo boxes that are also on my form. My record source for this form is a query “ReQryForecast” (which looks at those combo boxes via the criteria setting of that query). If changes are made to one of the combo boxes, the records displayed will change via my simple code in the after update event of my unbound combo box. This works fine…. Now I have a command button on Form1...
0
2916
by: Del | last post by:
Hello and thanks for any and all assistance! I have a database that is used by several users on several different machines. The backend database is housed on a file server. Each user has a front end on their local machine. The main form of the database has several query driven combo boxes. These queries pull data from the back end database to populate the combo boxes.
0
9398
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10156
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9832
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7375
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6649
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5419
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3924
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
2
3531
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2805
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.