Hi *,
I have a hard time to generate a dynamic query. I want to have 2 combo boxes.
(1) I choose a customer in combo box 1 (aka cboCurrentCustomer).
(2) I want to show only projects which are related to the customer shown in combo box 1
(SEE SCREENSHOT)
Now, I entered the following SQL code as data source for combo box 2. The critical part is the WHERE clause.
Here I want to join the value of combo box 1 with the customer_id in the table. Now, everztime when I choose a customer from combo box 1, I have to press F5 in order to show the correct projects in combo box 2. Has someone an idea of how I can solve this problem without pressing F5?
Thanks!
Steve
I have a hard time to generate a dynamic query. I want to have 2 combo boxes.
(1) I choose a customer in combo box 1 (aka cboCurrentCustomer).
(2) I want to show only projects which are related to the customer shown in combo box 1
(SEE SCREENSHOT)
Now, I entered the following SQL code as data source for combo box 2. The critical part is the WHERE clause.
Code:
SELECT project_extended.PROJECT_ID, project_extended.NAME, project_extended.CUSTOMER_ID
FROM project_extended
WHERE (((project_extended.CUSTOMER_ID)=[cboCurrentCustomer].[Value]) AND ((project_extended.STATUS_ID)=2))
ORDER BY project_extended.NAME;
Here I want to join the value of combo box 1 with the customer_id in the table. Now, everztime when I choose a customer from combo box 1, I have to press F5 in order to show the correct projects in combo box 2. Has someone an idea of how I can solve this problem without pressing F5?
Thanks!
Steve