Cascading Combo Boxes

G

Guest

I'm trying to get 2 combo boxes to cascade from One Main Table

For example
I have a field called Continents , another called Countries and the third
called Cities

How do i set it up in the combo box field so that when choose a
continent,it only shows me the continents (1 of them) and then only shows me
the countries in those continents and then the third box would only show
those cities in the country specified.
The main table is called "World"
Under row/source in the first Combo box, i specified. Table/Query
My row source has a select query that groups my "Continents"
Then i tried adding an event procedure in my After Update field.. Nothing
works
I don't know how to code it. I've searched through help and examples of
cascading boxes and don't find good examples.

Any help is appreciated
 
A

Al Campagna

Pete.
Given cboContinent and cboCity
cboContinent is a 1 column combo that lists all continents.
The query behind cboCity has 2 fields City and Continent. Continent in the query is
will have a criteria of...
=_Forms!frmYourFormName!cboContinent
so it will only show citeies associated with the cboContinent value.

Always Requery cboCity on the AfterUpdate evnt of cboContinent, to keep the two combos
"synched".

On my website below under Tips, I have afile called Sunched Combos that demonstrates
this process.

--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."
 
G

Guest

Thanks Al

I downloaded your example of state and city from your website.
Very helpful
But it only has 2 boxes..
do you have an example with 3?

I got the First Combo Box and second combo box completed but when i look up
in the second combo box after i choose my option in cbo box 1, the
information in combo box 2 clears out (not combo box 3) and then when i
choose combo box 2, i have the same information i chose in box 1..
(Using your example DB of state/city)
After i choose the State in cbobox1, my 2nd combo box for example will show
me the State again where the city should display.?

how does it work when you have the 3
 
A

Al Campagna

Pete,
So I asume that Continent to City needs an intervening combo called State to "drill
down" properly to the City.
It the same principle as just 2... each successive combo relying on the previous combo
for a filtering value.


cboContinent cboState cboCity
No Filter Continent = cboContinent State = cboState

--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top