mfaqueiroz
Registered User.
- Local time
- Today, 08:09
- Joined
- Sep 30, 2015
- Messages
- 125
Hello,
I have a simple doubt about CSV import.
I want the user chooses the file path to be transfered to an existing table:table1.
My table1 has the following columns: Date;MachineName;Status;MachineCode;Employee;Location Code;RunTime;Maintenance.
And my input table only has Date;MachineName and Status.
I've tried the following code, but appears this error:
"Run-time error '2391' Field 'Date;MachineName;Status" does not exist in destination table "TabInst", when they exist...
Do you have ideia how can i solve that?
Sub ImportCCRLanding_Click()
Dim fileName As Variant
Dim strFileName As String
Set fileName = Application.FileDialog(msoFileDialogOpen)
If fileName.Show Then
strFileName = fileName.SelectedItems(1)
DoCmd.TransferText acImportDelim, "", "Table1", strFileName, True
End If
End Sub
I have a simple doubt about CSV import.
I want the user chooses the file path to be transfered to an existing table:table1.
My table1 has the following columns: Date;MachineName;Status;MachineCode;Employee;Location Code;RunTime;Maintenance.
And my input table only has Date;MachineName and Status.
I've tried the following code, but appears this error:
"Run-time error '2391' Field 'Date;MachineName;Status" does not exist in destination table "TabInst", when they exist...
Do you have ideia how can i solve that?
Sub ImportCCRLanding_Click()
Dim fileName As Variant
Dim strFileName As String
Set fileName = Application.FileDialog(msoFileDialogOpen)
If fileName.Show Then
strFileName = fileName.SelectedItems(1)
DoCmd.TransferText acImportDelim, "", "Table1", strFileName, True
End If
End Sub