I have been using and Excel 2000 spreadsheet that has a link to external
data created by using MS Query. There is a cell on the top of the sheet set
so when I change the content, the query refreshes using this cell as the
parameter.

Recently we changed the datasource from a MS Access back end up to a MS SQL
2000 back end. I recreated the link to the datasource the same way by using
MS Query and choosing the SQL ODBC datasource instead of the Access
datasource and now the queries that have parameters will not return to Excel
2000 (sp3). I keep getting an error that says:

[Microsoft][ODBC SQL Server Driver]Syntax error or access violation

This query with a parameter runs fine in MS Query but if I save the query as
a DQY file and try to open it and it fires up Excel, I get the error. If I
change the parameter to a set value, then it runs fine again. This does not
appear to be a problem in Excel 2003. It is only Excel 2000 that I have
seen.

Here is the query from two left joined tables [RMA] and [Repair Serial
Numbers]:

SELECT
RMA.DateIssued,
RMA.SalesOrderNumber,
RMA.RMANumber,
RepairSerialNumbers.ProductNumber,
RepairSerialNumbers.Evaluation,
RepairSerialNumbers.Repair,
RepairSerialNumbers.FailureCode,
RMA.CustomerID,
RepairSerialNumbers.SerialNumber
FROM
{oj QualityTracking.dbo.RMA RMA LEFT OUTER JOIN
QualityTracking.dbo.RepairSerialNumbers RepairSerialNumbers
ON RMA.RMANumber = RepairSerialNumbers.RMANumber}
WHERE (RMA.CustomerID=?)