Syntax error in parameter clause

S

Sheila D

Using Access 2007 I have a report which uses the following SQL

PARAMETERS [ENTER 1ST BOX NUMBER] Short, [ENTER LAST BOX NUMBER] Short;
SELECT Val(T_Boxes![CALDERS BOX]) AS Sortby, T_BOXES.[CALDERS BOX],
T_BOXES.ARCHIVE_NO, T_FILES.[CLIENT REF], T_CLIENTS.NAME, T_FILES.CONTENTS,
T_FILES.[DATE FROM], T_FILES.[DATE TO]
FROM T_BOXES INNER JOIN (T_CLIENTS INNER JOIN T_FILES ON T_CLIENTS.[CLIENT
REF] = T_FILES.[CLIENT REF]) ON T_BOXES.[CALDERS BOX] = T_FILES.[CALDERS BOX]
WHERE (((Val([T_Boxes]![CALDERS BOX])) Between [ENTER 1ST BOX NUMBER] And
[ENTER LAST BOX NUMBER]))
ORDER BY Val(T_Boxes![CALDERS BOX]), T_BOXES.[CALDERS BOX], T_FILES.[CLIENT
REF];

It runs fine on my PC but PC in another office comes up with Syntax error in
PARAMETER clause. (Error 3139) when the report is run. The other PC does not
appear to have SP1 is this likely to be the problem? Any help much appreciated

Sheila
 
S

Stefan Hoffmann

hi Sheila,

I looks quite alright.

Sheila said:
PARAMETERS [ENTER 1ST BOX NUMBER] Short, [ENTER LAST BOX NUMBER] Short;
SELECT Val(T_Boxes![CALDERS BOX]) AS Sortby, T_BOXES.[CALDERS BOX],
T_BOXES.ARCHIVE_NO, T_FILES.[CLIENT REF], T_CLIENTS.NAME, T_FILES.CONTENTS,
As NAME is a reserved word I would enclose it in square brackets:
T_CLIENTS.[NAME]


mfG
--> stefan <--
 
S

Sheila D

Thanks Stefan, I'll try that but think if that was the reason would impact on
all PC's, it's very difficult because I'm trying to correct the problem on a
PC that does not have a problem!!

Stefan Hoffmann said:
hi Sheila,

I looks quite alright.

Sheila said:
PARAMETERS [ENTER 1ST BOX NUMBER] Short, [ENTER LAST BOX NUMBER] Short;
SELECT Val(T_Boxes![CALDERS BOX]) AS Sortby, T_BOXES.[CALDERS BOX],
T_BOXES.ARCHIVE_NO, T_FILES.[CLIENT REF], T_CLIENTS.NAME, T_FILES.CONTENTS,
As NAME is a reserved word I would enclose it in square brackets:
T_CLIENTS.[NAME]


mfG
--> stefan <--
 
S

Sheila D

Hi Steven

FYI and anyone else with the same issue, downloading SP1 resolved the problem!

Stefan Hoffmann said:
hi Sheila,

I looks quite alright.

Sheila said:
PARAMETERS [ENTER 1ST BOX NUMBER] Short, [ENTER LAST BOX NUMBER] Short;
SELECT Val(T_Boxes![CALDERS BOX]) AS Sortby, T_BOXES.[CALDERS BOX],
T_BOXES.ARCHIVE_NO, T_FILES.[CLIENT REF], T_CLIENTS.NAME, T_FILES.CONTENTS,
As NAME is a reserved word I would enclose it in square brackets:
T_CLIENTS.[NAME]


mfG
--> stefan <--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top