Dear all,
here's asking for your help please.
I'm back to programming VBA in Access after a 10 years break. I'm doing well, but can't get this one to work:
I got a form with a subform ([Datenpaare Abfrage Unterformular2] - and I think this is the name of it's container, too, but am not too sure if I got that right - where may I look that up to be sure?). The subform displays rows from a query "Datenpaare Abfrage" (which is based on an SQL query that integrates three tables with INNER JOIN).
The main form [IT-System Wenn-Dann Analyse Kosten] with two combo boxes, Kombinationsfeld26 and Kombinationsfeld34.
The first combo box displays all values of a certain column (i.e. column_1) in one of the mentioned three tables (i.e. table_1), using a SELECT DISTINCT SQL query.
When a user changes the first combo box, I'd like two things to take place:
* the subform displays only rows whose column_1 entry matches the value selected in the first combo box (I had that one working using a SearchForRecord macro)
* the second combobox shows all values available in a second column (i.e. table_1, column_2) from those rows whose column_1 value matches the selection in the first combo box (in SQL: SELECT DISTINCT column_2 from table_1 where column_1 = value of first combo box).
When a user then changes the second combo box, I'd like that:
* the subform displays only rows whose column_1 and column_2 entries matches the values selected in the first and second combo boxes respectively
Have been trying to get this working for eight hours now.
Your help, or a pointer into the right direction, heartly welcome.
Thanks in advance for your time!
Sincerely,
RK
here's asking for your help please.
I'm back to programming VBA in Access after a 10 years break. I'm doing well, but can't get this one to work:
I got a form with a subform ([Datenpaare Abfrage Unterformular2] - and I think this is the name of it's container, too, but am not too sure if I got that right - where may I look that up to be sure?). The subform displays rows from a query "Datenpaare Abfrage" (which is based on an SQL query that integrates three tables with INNER JOIN).
The main form [IT-System Wenn-Dann Analyse Kosten] with two combo boxes, Kombinationsfeld26 and Kombinationsfeld34.
The first combo box displays all values of a certain column (i.e. column_1) in one of the mentioned three tables (i.e. table_1), using a SELECT DISTINCT SQL query.
When a user changes the first combo box, I'd like two things to take place:
* the subform displays only rows whose column_1 entry matches the value selected in the first combo box (I had that one working using a SearchForRecord macro)
* the second combobox shows all values available in a second column (i.e. table_1, column_2) from those rows whose column_1 value matches the selection in the first combo box (in SQL: SELECT DISTINCT column_2 from table_1 where column_1 = value of first combo box).
When a user then changes the second combo box, I'd like that:
* the subform displays only rows whose column_1 and column_2 entries matches the values selected in the first and second combo boxes respectively
Have been trying to get this working for eight hours now.
Your help, or a pointer into the right direction, heartly welcome.
Thanks in advance for your time!
Sincerely,
RK