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

How to change the contents of a combo box based on another

P: n/a
Hi,

I wonder if any one can help, I'm pretty new to Access and I can't
figure out how to change the contents of a combo box based on a
selection I make in another.

Let me explain I have a combo box where I can select a continent from
a continent table. I would like the contents of a second combo box to
reflect my choice of continent and list countries that are in that
continent. These countries are in separate tables/queries (actually a
query based on the table that orders the countries alphabetically).

The database contains the following tables/queries

Continent Table: SOURCE OF FIRST COMBO BOX
Continent ID
Continent

European (American, Asian) Countries Tables:
Europen Country ID
Europen Country

European Country List (Query) SOURCE OF SECOND COMBO BOX
Eurpean Country (ordered sourced from above table)

I haven't quite grasped how Access passes on information from one area
to another so could anyone describe as simply as possable how to go
about it would be greatly appreciated.

Regards,

Jeff
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Jeff Barry wrote:
Hi,

I wonder if any one can help, I'm pretty new to Access and I can't
figure out how to change the contents of a combo box based on a
selection I make in another.


<snipped>
http://www.mvps.org/access/forms/frm0028.htm

This site should be your first port of call when you need to work something
out.
Nov 12 '05 #2

P: n/a
jb****@picr.man.ac.uk (Jeff Barry) wrote in
news:b8**************************@posting.google.c om:
Hi,

I wonder if any one can help, I'm pretty new to Access and I
can't figure out how to change the contents of a combo box
based on a selection I make in another.

Let me explain I have a combo box where I can select a
continent from a continent table. I would like the contents of
a second combo box to reflect my choice of continent and list
countries that are in that continent. These countries are in
separate tables/queries (actually a query based on the table
that orders the countries alphabetically).

The database contains the following tables/queries

Continent Table: SOURCE OF FIRST COMBO BOX
Continent ID
Continent

European (American, Asian) Countries Tables:
Europen Country ID
Europen Country

European Country List (Query) SOURCE OF SECOND COMBO BOX
Eurpean Country (ordered sourced from above table)

I haven't quite grasped how Access passes on information from
one area to another so could anyone describe as simply as
possable how to go about it would be greatly appreciated.

Regards,

Jeff

First of all you will find it easier, (much easier), if you put
all your countries into a single table With three fields,
Continent ID, CountryID, Country.

Create a continents combo, cboContinents.

Create a combo for the countries, cboCountries.

Then you set the rowsource for the cboCountries to
="SELECT country from countries where continentID = " &
cboContinents"

put me.cboCountries.requery in either the
cboContinents_AfterUpdate event or the cbocountries_OnEnter
event.

Use the form.

Bob Q
Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.