开发者

A2K Error 3011 on TransferSpreadsheet method

I'm jut trying to import a spreadsheet into a table in Access 2000.

The spreadsheet开发者_Go百科 is called cc-ledgcodebalances.xls with no field names.

My code is

DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel3, "tmptmp", VFileName, 0

This seemed to work once but since then I now get this;

The Microsoft Jet database engine could not find the object ''cc-ledgcodebalances$''. Make sure the object exists and that you spell its name and the path name correctly. 3011

Google searches aren't really turning up much that is useful. I'm trying to import the whole thing and I don't think this is to do with named ranges.

Bit stumped by this, any help?


I answered this elsewhere that you asked it:

The error you're getting often occurs when the saved import spec is out of synch with either the source data or the target table. Try starting the import with the wizard, then load the saved import spec and it will likely throw an error or reveal what's no longer accurate.


I just had a similar problem under 2007 using direct range references instead of named ranges. It seems that dollar signs in the range reference can cause this error. Using Replace() on "$" and replacing with "" solved this issue in my case.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜