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!

Import Multiple SpreadSheet Help

Status
Not open for further replies.

MadMax7

MIS
Feb 17, 2004
62
GB
I hope someone can help, i have used the following code from thread 705-892728

Dim ImportFile
ImportFile = Dir("C:\Program Files\Alcatel\A4400 Call Center Supervisor\Excel\DAILY\Agents\18_09_06\*")
Do While ImportFile <> ""
DoCmd.TransferSpreadsheet acImport, 8, "tblInitialAgentCcsData", ImportFile, False
ImportFile = Dir
Loop

the problem i have is that the import file line works as it gives the first file name correctly but i then get a error on the docmd.transferspreadsheet line saying that the file name can not be found
 
Dim ImportDir As String, ImportFile As String
ImportDir = "C:\Program Files\Alcatel\A4400 Call Center Supervisor\Excel\DAILY\Agents\18_09_06\"
ImportFile = Dir(Importdir & "*")
Do While ImportFile <> ""
DoCmd.TransferSpreadsheet acImport, 8, "tblInitialAgentCcsData", Importdir & ImportFile, False
ImportFile = Dir
Loop

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top