I have a database I'm working on where I need to populate a combo box from the values in a query.
The control source on m form is a box called "County"
The row source for County is: SELECT [Counties Query].CountyName FROM [COUNTIES QUERY];
Inside the Counties Query I have the criteria:
[Forms]![Customers]![State]
My goal is to have the County field look up County choices based on the state.
For example, if the State selected in the State Field is "California" it would only show California counties in the combo box on the form.
It works great for the first record. However, it appears the criteria is permanently bound to that first record.
How do I tell Access to change that criteria every time someone changes the state? I have a feeling it will require some VBA so I'm not sure of the steps.
It seems to me it should just be an easy step to refresh the query with the new form data for the state.
I can upload the database if needed.
The control source on m form is a box called "County"
The row source for County is: SELECT [Counties Query].CountyName FROM [COUNTIES QUERY];
Inside the Counties Query I have the criteria:
[Forms]![Customers]![State]
My goal is to have the County field look up County choices based on the state.
For example, if the State selected in the State Field is "California" it would only show California counties in the combo box on the form.
It works great for the first record. However, it appears the criteria is permanently bound to that first record.
How do I tell Access to change that criteria every time someone changes the state? I have a feeling it will require some VBA so I'm not sure of the steps.
It seems to me it should just be an easy step to refresh the query with the new form data for the state.
I can upload the database if needed.