Jumat, 21 Juni 2013

[MS_AccessPros] Re: RT error 7890, file doesn't contain any data

 

Adam

What happens if you manually import the data? Maybe something will show you what's going wrong.

If you had more than one sheet and one was set as a named range and later deleted, you might have to specify the sheet that has the data.

DoCmd.TransferSpreadsheet acImport, , "ShippingExtract", _
"g:\TMM\ShippingExtract.xls", True, "Sheet1$"

Note the dollar sign at the end of the sheet's name.

Regards,
Bill Mosca, Founder - MS_Access_Professionals
http://www.thatlldoit.com
Microsoft Office Access MVP
https://mvp.support.microsoft.com/profile=C4D9F5E7-BB03-4291-B816-64270730881E
My nothing-to-do-with-Access blog
http://wrmosca.wordpress.com

--- In MS_Access_Professionals@yahoogroups.com, "AdamF" <runuphillracing@...> wrote:
>
> I don't understand why I'm getting this message when trying to import from an Excel file, using the following code:
> DoCmd.TransferSpreadsheet acImport, , "SalesExtract", "g:\TMM\SalesExtract.xls", True
>
> The file DOES contain data. I use almost the same code to import another file, which does work.
> DoCmd.TransferSpreadsheet acImport, , "ShippingExtract", "g:\TMM\ShippingExtract.xls", True
>
> Can someone help?
>
> Thanks
> Adam
>

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (7)
.

__,_._,___

Tidak ada komentar:

Posting Komentar