G
Guest
Below is an SQL statment I am trying to get to work to pull data into Access
from Excel. The problem is with the range (FROM [80%!A3200] ). The
current syntax is the closest I can get.
The error returned is 3125 - Is not a valid name. Be sure it doesn't
contain invalid characters or punctuation....
Every other way I have tried returns 3131 Invalid syntax in FROM clause.
I was suspicious about the %, but it workd with a transferspreadsheet. I
really don't what to have to link it, I would rather just get it in this way.
strSql = "INSERT INTO tblPipeline80 (Curr_Year, Curr_Month,
Program_Manager, ITM, " _
& "Opportunity, Resource, Jan, Feb, Mar, Apr, May, Jun, " _
& "Jul, Aug, Sep, Oct, Nov, Dec, Source_Sheet ) " _
& "SELECT '2005', '04', [Prog Mgr], ITM, Opportunity, Resource, Jan,
Feb, " _
& "Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec, 'Pipeline 2005
April'" _
& " FROM [80%!A3200] IN '' [Excel 8.0;Hdr=Yes;DATABASE=" _
& "C:\Documents and Settings\hargida\My Documents\Access\" _
& "Pipeline 2005 April.xls;];"
from Excel. The problem is with the range (FROM [80%!A3200] ). The
current syntax is the closest I can get.
The error returned is 3125 - Is not a valid name. Be sure it doesn't
contain invalid characters or punctuation....
Every other way I have tried returns 3131 Invalid syntax in FROM clause.
I was suspicious about the %, but it workd with a transferspreadsheet. I
really don't what to have to link it, I would rather just get it in this way.
strSql = "INSERT INTO tblPipeline80 (Curr_Year, Curr_Month,
Program_Manager, ITM, " _
& "Opportunity, Resource, Jan, Feb, Mar, Apr, May, Jun, " _
& "Jul, Aug, Sep, Oct, Nov, Dec, Source_Sheet ) " _
& "SELECT '2005', '04', [Prog Mgr], ITM, Opportunity, Resource, Jan,
Feb, " _
& "Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec, 'Pipeline 2005
April'" _
& " FROM [80%!A3200] IN '' [Excel 8.0;Hdr=Yes;DATABASE=" _
& "C:\Documents and Settings\hargida\My Documents\Access\" _
& "Pipeline 2005 April.xls;];"