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

Problem with TransferSpreadsheet Method!!!

Status
Not open for further replies.

legs00

Programmer
Oct 17, 2001
36
0
0
CA
Hi,

I am trying to tranfer a excel spreadsheet to my access application the process work fine if I choose the excel file I wish to transfer and press "OK". The problem is that if I wish to exit by pressing the "Cancel" button I get an error message:


"Run-Time Error '2522':
The action or method requires a File Name argument."

I think that the error comes from the dialog box itself but how do I fix it? Here is the code I have that transfers the Excel spreadsheet. Could there be something wrong with it??


DoCmd.TransferSpreadsheet acImport,acSpreadsheetTypeExcel3,
"TempJovacoExtract", strFichier, True

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top