I am attempting to import a csv file into my access database. I've set up the code as follows but upon running it I get a 3011 error noting that it could not find the object....blah blah blah.
pth = Me!txtfilepathimport
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "LLUTMtrans", pth, True
Essentially the path to "My Documents" directory is being appended to the front of the "pth" value I am supplying to the function. This is confirmed in the feedback from the error raised. The table noted, "LLUTMtrans" does not exist in my database. I intend to create it as a new table. If I hard code in the path to the file this works just fine. I have no explanation as to why it is doing this? Has anyone else encountered this type of event?
pth = Me!txtfilepathimport
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "LLUTMtrans", pth, True
Essentially the path to "My Documents" directory is being appended to the front of the "pth" value I am supplying to the function. This is confirmed in the feedback from the error raised. The table noted, "LLUTMtrans" does not exist in my database. I intend to create it as a new table. If I hard code in the path to the file this works just fine. I have no explanation as to why it is doing this? Has anyone else encountered this type of event?