Hi,
I working on a function that, in theory, should generate a csv file from a table.
While all the fields belonging to the table are TEXT, I always get the same error:
Text file specification field separator matches decimal separator or text delimiter.
I'm really not sure why this error is coming up, if I create a XLS file, I can convert the file from XLS to CSV without receiving any errors.
That leads me to thing that the code that I am using is wrong?
Here it is:
Private Sub Command0_Click()
On Error GoTo Err_Command0_Click
Dim MyPath As String
Dim StrError As String
MyPath = GetPath(Me)
MyPath = MyPath & "\MYFILE.csv"
DoCmd.TransferText acExportDelim, , "CSVExport", MyPath, True
StrError = "File has been created: " & MyPath
MsgBox StrError, vbInformation, "System Information"
Exit_Command0_Click:
Exit Sub
Err_Command0_Click:
MsgBox Err.Description
Resume Exit_Command0_Click
End Sub
Can anyone push me in the right direction?
Thanks,
I working on a function that, in theory, should generate a csv file from a table.
While all the fields belonging to the table are TEXT, I always get the same error:
Text file specification field separator matches decimal separator or text delimiter.
I'm really not sure why this error is coming up, if I create a XLS file, I can convert the file from XLS to CSV without receiving any errors.
That leads me to thing that the code that I am using is wrong?
Here it is:
Private Sub Command0_Click()
On Error GoTo Err_Command0_Click
Dim MyPath As String
Dim StrError As String
MyPath = GetPath(Me)
MyPath = MyPath & "\MYFILE.csv"
DoCmd.TransferText acExportDelim, , "CSVExport", MyPath, True
StrError = "File has been created: " & MyPath
MsgBox StrError, vbInformation, "System Information"
Exit_Command0_Click:
Exit Sub
Err_Command0_Click:
MsgBox Err.Description
Resume Exit_Command0_Click
End Sub
Can anyone push me in the right direction?
Thanks,