Using cell values in SQL (MS Query)
When you are editing the query using the interface (not the wizard)
use square brackets with a space in between to create parameters.
These will enter the ?s in the SQL statement while the interface
writes SQL for you.
When you return to Excel, you'll be prompted for the parameters. You
can choose ranges (cells) for the parameters and tell it whether to
always look there for each parameter.
Cliff Edwards
|