Docmd.TransferSpreadsheet question

polina

Registered User.
Local time
Today, 10:40
Joined
Aug 21, 2002
Messages
100
Hi,

The spreadsheet file I want to import has 2 sheets in it.

Using this line, I only get the first sheet imported:
DoCmd.TransferSpreadsheet acImport, , "Eroom", path, True

How to import two sheets of into two different tables?

Thanks.
 
When i use the transfer spreadsheet command i get an error message saying 'Field F1 does not exit in 'Table Name'.

I think this is something to do with my MS Access but im not so sure. Any ideas??
 
You could try this code, it will transfer on sheet to one table and your second sheet to another table. Hope this works, let me know how you get on.

DoCmd.TransferSpreadsheet acImport, 8, "tblTest", "path", True, "Sheet1!A1:B14"

DoCmd.TransferSpreadsheet acImport, 8, "tblTesting", "path", True, "Sheet2!A1:B14"
 

Users who are viewing this thread

Back
Top Bottom