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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Importing Excel file in to access table

Status
Not open for further replies.

math20

MIS
Jul 7, 2005
71
CA
Hi,

I am trying to import an excel file into access table. Until yesterday I had this code and it was working fine, where it imported the excel file into access table and named it. This is the code I am using:
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "", strFileName, True

But Now it gives me an error and the error is:
The action or methoid requires a Table Name argument.

Now if I create a table and use that table name then I get this error:
"Too many fields defined" or even sometime "The search was not found in any record".

What confuses me is that fact that it worked before when I did not specify any table name.

Can anyone please help me with this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top