Ah, thought you might have been referring to a saved query.

If you do it using VBA/ADO you have to code for the parameters yourself.

You have various options for user input, cells, inputboxes, a small userform perhaps.

Once you have the input you either need to incorporate it in the SQL statement or use the Parameters collection.