Combining 2 Combo Boxes to filter down records to 1

F

Fischkopp

Hi Guys,

I am really desperate. I created a table (Access rights for our customers)
containing 91 rows and 35 columns.

Columns:
ID COUNTRY POSITION CODE .............etc.......

The combination of COUNTRY + POSITION CODE defines the rest of the values of
each row. Therefore I am not able to split the table.

I want to create 2 combo boxes to filter down. I.e.:

The 1st combo box shall contain all COUNTRIES once ! (they are several times
available in the COUNTRY column). >> All records are reduced to max. 10 <<

The 2nd Combo box shall contain all POSITION CODES once! (they are also
several times available in the POSITION CODES column) which shall reduce all
records to exactly 1 ! (Same effect as the AUTOFILTER in EXCEL).

4 days and nights already I am having a breakdown because of this problem.
Every help will be highly appreciated.

Thank you guys for your help

Fischkopp
 
K

Klatuu

All you need is two select queries to use as the row sources for your combo
boxes.
The first, Country, will need only one column, the COUNTRY code. Make it a
Totals query with the group by opton. This will give you a list of all the
countries, with each country in the list one time.
The second, Position Code will need two columns, one for COUNTRY and one for
POSITION CODE. You will want to filter this query to include only POSITION
CODE that are valid for the COUNTRY selected in the first combo. To do that,
in the COUNTRY column Criteria, reference the Country combo:
forms!MyFormName!MyCountryCombo
You can also uncheck the Show row for the COUNTRY column so it will not be
included in what is returned.
You also want to make this a Totals query with both columns as Group By.
 
F

Fischkopp

Thank you very much for your quick response . It looks very helpful. I only
forgot to mention that the output shall be in the same form as the combo
boxes. is this possible?

Many greetings
Fischkopp
 
F

Fischkopp

Thank you very much for your quick response . It looks very helpful. I only
forgot to mention that the output shall be in the same form as the combo
boxes. is this possible?

Many greetings
Fischkopp
 
A

Allen Browne

So, your last combo box needs to set the RecordSource (or Filter) of your
form.
 
Top