HELP-VBA SQL error! "Expected: Line number or label or statement or end of statement"
Hi, this one has got me going in circles. I created the query in design view and took the SQL code, but I just can't seem to get it cleared up!
Any help will be sincerely appreciated!
:banghead:
Hi, this one has got me going in circles. I created the query in design view and took the SQL code, but I just can't seem to get it cleared up!
Code:
mySQL = "INSERT INTO tblUnbilled_BegMonth_ExcludedData ( [Billing Status], LOB, [Area Head Name], [Dept Head Name], [Division Head Name], [Unit Head Name],)" _
"([Manager #], [Manager Name], [Customer Id], [Customer Name], Fund, [CBS Id], [Fund Name], [Fund Type], Cycle, [Billing Frequency], [Billing Month], [Accrual Est], [Last Billed -1], [Last Billed -2], [Last Billed -3], [Date Modified] )" & _
"SELECT tblUnbilled_BegMonth_CleanData.[Billing Status], tblUnbilled_BegMonth_CleanData.LOB, tblUnbilled_BegMonth_CleanData.[Area Head Name], tblUnbilled_BegMonth_CleanData.[Dept Head Name], tblUnbilled_BegMonth_CleanData.[Division Head Name], tblUnbilled_BegMonth_CleanData.[Unit Head Name], tblUnbilled_BegMonth_CleanData.[Manager #], tblUnbilled_BegMonth_CleanData.[Manager Name], tblUnbilled_BegMonth_CleanData.[Customer Id], tblUnbilled_BegMonth_CleanData.[Customer Name], tblUnbilled_BegMonth_CleanData.Fund, tblUnbilled_BegMonth_CleanData.[CBS Id], tblUnbilled_BegMonth_CleanData.[Fund Name], tblUnbilled_BegMonth_CleanData.[Fund Type], tblUnbilled_BegMonth_CleanData.Cycle, tblUnbilled_BegMonth_CleanData.[Billing Frequency], tblUnbilled_BegMonth_CleanData.[Billing Month], tblUnbilled_BegMonth_CleanData.[Accrual Est], tblUnbilled_BegMonth_CleanData.[Last Billed -1], tblUnbilled_BegMonth_CleanData.[Last Billed -2], tblUnbilled_BegMonth_CleanData.[Last Billed -3], tblUnbilled_BegMonth_CleanData.[Date Modified]
"FROM tblUnbilled_BegMonth_CleanData" & _
"WHERE (((tblUnbilled_BegMonth_CleanData.[Billing Month])> '" & crntCBSUnbilledCycle & "'));"
Any help will be sincerely appreciated!
:banghead: