SQL Error Message

T

Tony

I am receiving the following error:

Syntax error in query expression
reports_in_progress_current_xl[GLOBALDCCDATA].[GLOBAL_DCC_CODE]

when I am executing the following code:

DoCmd RunSQL "SELECT reports_in_progress_current_xl [Global DCC
Data].[Global_DCC_Code], [Global DCC Data].[Part1_Request_Title], [Global DCC
Data].[Part1_Initiated_Date], [Global DCC Data].[Global_Current_Stage],
[Global DCC Data].[Part3_Delegated_To],[Global DCC
Data].[Part3_Delegated_Job_No], [Global DCC
Data].[Part3_Delegated_Activity_No], [Global DCC
Data].[Part4_Estimate_Man_Hours], [Global DCC Data].[Global_Project] INTO
[temp table] from reports_in_progress_current_xl;

But the query itself is executed properly. What is wrong, how I can fix it
to stop this error from appearing.

Thanks for help.
 
T

Tony

I have forgotten to add " on the end of the line. The proper code I am using
is:

DoCmd RunSQL "SELECT reports_in_progress_current_xl [Global DCC
Data].[Global_DCC_Code], [Global DCC Data].[Part1_Request_Title], [Global DCC
Data].[Part1_Initiated_Date], [Global DCC Data].[Global_Current_Stage],
[Global DCC Data].[Part3_Delegated_To],[Global DCC
Data].[Part3_Delegated_Job_No], [Global DCC
Data].[Part3_Delegated_Activity_No], [Global DCC
Data].[Part4_Estimate_Man_Hours], [Global DCC Data].[Global_Project] INTO
[temp table] from reports_in_progress_current_xl;"

Thanks for help.
 
S

Sylvain Lafontaine

You are probably missing a point or a comma between
reports_in_progress_current_xl and [GLOBALDCCDATA].[GLOBAL_DCC_CODE]

S. L.

Tony said:
I have forgotten to add " on the end of the line. The proper code I am
using
is:

DoCmd RunSQL "SELECT reports_in_progress_current_xl [Global DCC
Data].[Global_DCC_Code], [Global DCC Data].[Part1_Request_Title], [Global
DCC
Data].[Part1_Initiated_Date], [Global DCC Data].[Global_Current_Stage],
[Global DCC Data].[Part3_Delegated_To],[Global DCC
Data].[Part3_Delegated_Job_No], [Global DCC
Data].[Part3_Delegated_Activity_No], [Global DCC
Data].[Part4_Estimate_Man_Hours], [Global DCC Data].[Global_Project] INTO
[temp table] from reports_in_progress_current_xl;"

Thanks for help.

Tony said:
I am receiving the following error:

Syntax error in query expression
reports_in_progress_current_xl[GLOBALDCCDATA].[GLOBAL_DCC_CODE]

when I am executing the following code:

DoCmd RunSQL "SELECT reports_in_progress_current_xl [Global DCC
Data].[Global_DCC_Code], [Global DCC Data].[Part1_Request_Title], [Global
DCC
Data].[Part1_Initiated_Date], [Global DCC Data].[Global_Current_Stage],
[Global DCC Data].[Part3_Delegated_To],[Global DCC
Data].[Part3_Delegated_Job_No], [Global DCC
Data].[Part3_Delegated_Activity_No], [Global DCC
Data].[Part4_Estimate_Man_Hours], [Global DCC Data].[Global_Project] INTO
[temp table] from reports_in_progress_current_xl;

But the query itself is executed properly. What is wrong, how I can fix
it
to stop this error from appearing.

Thanks for help.
 

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