Reputation: 12517
I have a parameterized SQL statement which takes a string as an input.
Instead, to avoid manual input error, I would like the user to be able to select the parameter value from a drop down list. I want the values of the drop down list to equal the distinct values in a column.
How can I achieve this?
Upvotes: 0
Views: 263
Reputation: 25272
Create a form with a combo, a OK command button and a Cancel command button.
Refer to that combo in the condition of your query (use the wizard if you have trouble doing that).
Have the Ok button open the query, and the Cancel button close its parent form.
The combo RowSource should contain your SELECT DISTINCT
.
Upvotes: 1