Yes it is possible.
My preferred method is to let the code build the SQL statement. Another method is to goof around with the QueryDef in code and add parameters then set set the parameter values which I've had to do a few times, but I'm not well versed (perhaps Pat can give you an example of this).
Basically, the process is like this:
For example you have a form with a combobox. The combobox has been populated with a list of all customers in your database. Now if you want to execute a query that only shows records from your order table that match the select customer, your SQL statement would be
"Select * from Orders where [CustomerID]=" & me.combobox & ";"
Is this what you are looking for, or did I over-simplify your question?