Question about Ghudsons browse sample

cubbyamber

Registered User.
Local time
Yesterday, 17:45
Joined
Aug 28, 2006
Messages
60
I have successfully imported GHudson's browse forms, table, and modules into my database. I need to import an excel sheet into my database.

I have tried to change the code on the import with different codes I found via this forum.

I have changed the import table name to my import table name which is tblImport I have changed the code to do a spreadsheet but it still isn't working. I don't know what I am doing wrong. I am attaching a copy of my database as well as the spreadsheet that I need to import. Any help would be appreciated.

Tracy
 

Attachments

Change this:
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, , "tblImport", tbFile

To this;

DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "tblImport", tbFile, True, ""

You had an extra , after acSpreadsheetTypeExcel9
Adding True tell access that the excel worksheet has "Field Names" in the first row, which you do in text3.xls
 
Thank you, it worked like a charm.

Tracy
 

Users who are viewing this thread

Back
Top Bottom