SQL Error Message

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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.
 
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.
 
Back
Top