Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Transfer Spreadsheet help please

Status
Not open for further replies.

MadMax7

MIS
Feb 17, 2004
62
GB
i hope some one can help i am pulling my hair out with this one

I have the following code

DoCmd.TransferSpreadsheet acImport, 8, "tblInitialQuoteData", "H:\Retail Network\Public\0800Plan\Ops Team\Non Motor & Internet\NSU man tracking V6.XLS", NO, QuoteDatabyName

when i run the code i get run time error Too many fields defined..

I have checked that the version of excel and access match i have also run this using a macro and it works the problem i have is i have to import over 40 spreadsheets daily and don't really want to have to do this with 40 macros.

hope some can save my sanity
 
I'm not familier with this process but if your looking to "Export" to a spreadsheet, why do you use "acImport"?
DoCmd.TransferSpreadsheet acImport, 8
 
Difficult to comment without more information. Firstly the HasFieldsNames argument should be False rather than NO. However: How many columns are there in the spreadsheet and what is the value of QuoteDatabyName?
 
This one works for me.

DoCmd.TransferSpreadsheet acImport, 8, "YourTable", "YourFilePath\YourFileName.xls ", True,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top