I have a form (Form1) with two combo boxes (Combo1 and Combo2). Both have their Row Sources as queries based on the same reference table (tbl1). For ease, I'll say the table has two columns as below.
Col1 Col2
1 A
2 B
3 B
4 A
5 B
The first combo box has a row source
and the second has row source
The idea being that the user can make a selection in the first combo box which will narrow down the options in the second combo box.
This works fine when the form is first opened, but once the second combo box list has been displayed, changing what is in the first combo box makes no difference to the available options in the second one.
Is there a way of getting the second box to requery it's row source when the first box is changed?
Col1 Col2
1 A
2 B
3 B
4 A
5 B
The first combo box has a row source
Code:
SELECT DISTINCT tbl1.Col2 FROM tbl1;
and the second has row source
Code:
SELECT tbl1.Col1
FROM tbl1
WHERE (((tbl1.Col2)=[Forms]![Form1]![Combo1]))
OR ((([Forms]![Form1]![Combo1]) Is Null));
The idea being that the user can make a selection in the first combo box which will narrow down the options in the second combo box.
This works fine when the form is first opened, but once the second combo box list has been displayed, changing what is in the first combo box makes no difference to the available options in the second one.
Is there a way of getting the second box to requery it's row source when the first box is changed?