Georg Schölly
Georg Schölly

Reputation: 126105

Why does a report throw an error when the corresponding query doesn't?

I have to use a Microsoft Access application. (At least until I've got time to rewrite it in another language.)

I've got a report that throws the error "Syntax error in PARAMETER clause."

At the moment the SQL looks like this:

PARAMETERS [Test] Text ( 255 );
SELECT …

If I remove the PARAMETERS-line the problem vanishes.

Strange is, that if I open the query in the Datasheet view, the program displays the dialog. Only if I try to open the report it displays this message.

Any clue what's wrong?

Upvotes: 2

Views: 313

Answers (1)

Boden
Boden

Reputation: 4167

Could this be a bug that's fixed by MS Office Service Pack 1?

http://support.microsoft.com/kb/942378

About a third the way down that document:

Error message when you execute a query that contains parameters in Access 2007: "Syntax error in Parameter clause" In Access 2007, you receive the following error message when you try to execute a query that contains parameters:

Upvotes: 2

Related Questions