By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,397 Members | 1,425 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,397 IT Pros & Developers. It's quick & easy.

union query - populate combo boxes

P: 65
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
Share this Question
Share on Google+
2 Replies


P: 3
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
Expert Mod 15k+
P: 31,661
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

Post your reply

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