psycoperl
Active Member
- Joined
- Oct 23, 2007
- Messages
- 338
- Office Version
- 365
- 2016
- Platform
- Windows
- MacOS
- Web
Good Evening,
I am trying to in VBA import a csv into my table called tblCompassData and am getting the following error message:
the file name is picked using Ken Getz's file selection tool, which is called by cmdSelectDataFile_Click() and displayed in Me.txtFile
the file is located on a shared Mapped drive in the path: R:\CIV_DataFiles\
Below is the code that I am using.
Any advice you can offer would be greatefully appreciated.
I am trying to in VBA import a csv into my table called tblCompassData and am getting the following error message:
Run-time error '3011':
The Microsoft Access database engine could not find the object 'CIV_MSR140714170432 2014.07.09 - 2014.07.14.csv'. Make sure the object exists and that you spell its name and the path correctly. If 'CIV_MSR140714170432 2014.07.09 - 2014.07.14.csv' is not a local object, check your network connection or contact the server administrator.
the file name is picked using Ken Getz's file selection tool, which is called by cmdSelectDataFile_Click() and displayed in Me.txtFile
the file is located on a shared Mapped drive in the path: R:\CIV_DataFiles\
Below is the code that I am using.
Any advice you can offer would be greatefully appreciated.
Code:
Private Sub cmdProcess_Click()
If MsgBox("Are you sure that you wish to load data file " & Me.txtFile.value & " into " & CIV_AppName & "?", vbYesNo, CIV_AppName) = vbYes Then
MsgBox "PROCESS FILE"
Debug.Print Me.txtFile.value
DoCmd.TransferText acImportDelim, "ImportSpec_CompassIV", "tblCompassData", Me.txtFile, True
MsgBox Me.txtFile.value & " has been loaded into " & CIV_AppName, vbInformation, CIV_AppName
Else
MsgBox "Processing of " & Me.txtFile.value & " has been aborted.", vbInformation, CIV_AppName
Call cmdReset_Click
End If
End Sub