Hi,

I have an Excel workbook that is connected to another using SQL built into Excel's MS Query program. I've limited SQL knowledge at the moment and have up to now been passing parameters via the WHERE clause; eg WHERE OrderAmount > ?. A little research has led me to discover the PARAMETER clause that can be placed before the SELECT statement in MS Query when using MS Access:

PARAMETERS [Low price] Currency,
[Beginning date] DateTime;
SELECT OrderID, OrderAmount
FROM Orders
WHERE OrderAmount > [Low price]
AND OrderDate >= [Beginning date];

The above syntax doesn't work in Excel. I don't (and never will) have MS Access at work thus my queries must be between two Excel files.

I'd like to know if the PARAMETER clause is possible in Excel (maybe just a different syntax to Access) or am I stuck with using parameters in the WHERE clause?

My reason for asking is that I have to include the same parameter more than once in the query. When done using the WHERE clause this means I get the same parameter listed more than once in the destination table's Parameters dialog box.

Any help appreciated,

Sam