Using multiple combobox's to filter down a result.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

This question has two parts

1)I am trying to create a form that will have a few combobox's in it.
the records source for each of them will be a diffrent field in the same
table.
I want it that when i pick the first combobox, it will after refliter the
othercombobox/form that way it will display in the next combobox only the
ones that have the same as in the first one. for example:
colum a colum b colum c
A R F
A C G
B R
H
B E
I


So when i select A from colum a, all that will be displayed in colum b is
"R" and then when i select "R" all that will display in colum c is "F", since
that is the only thing that has "A" & "R".

2)I then want it then when i select F if will place that record into a
diffrent textbox in a diffrent form.

any help will be most appreciated.

thank you
 
Coordinated combo boxes require that you modify the query(ies) underlying
the "next" combo box(es).

The second combo box's query uses the contents of the first as a selection
criterion. In the AfterUpdate event on the first combo box, use something
like:

Me!cboSecondCombo.Requery

If you have three, use the criteria from the first and second in the query
of the third, and remember to requery the third after chosing in the second
(and the first).

For the second part of your question, why not load up a record in the same
form as your combo boxes? Once again, you can use the AfterUpdate event of
your third to requery the form, and make the form's source/query selection
based on the contents of the three combo boxes.

Good luck

Jeff Boyce
<Access MVP>
 
Back
Top