I am exporting a table into a text file for another program to pick up and use.
The code below works fine, but the end resulted text adds character 32 " to my results:
-------------------------------------------
Private Sub Command0_Click()
'check if file is there- if so, deletes it
If Len(Dir("C:\temp\ET.txt")) = 0 Then
GoTo skipper
Else
Kill ("C:\temp\ET.txt")
End If
skipper:
'queries to fill up my table
DoCmd.OpenQuery "Stage 1_ clean"
DoCmd.OpenQuery "Stage_1_Fill"
DoCmd.OpenQuery "Stage_1_Fill_ENDENDE"
DoCmd.TransferText acExportDelim, , "Stage one", "c:\temp\ET.txt", False
'popup telling user what the next step in the process is.
MsgBox "Ok- please run SABRE script " & Chr(34) & "utkt1" & Chr(34) & Chr(13) & "Then return here and run the second stage", vbOKOnly, "Done"
End Sub
------------------------------------------------------
This is the data in my table:
O2VC88
O2VC89
O2VC91
O2VC92
This is how it come out in the text file:
"O2VC88"
"O2VC89"
"O2VC91"
"O2VC92"
Why is this quote character there? I don't want it there. How do I get rid of it?
I have tried to change the transfertext to "acExportFixed" thinking perhaps this had soemthing to do with it, but I get this error message:
"The action of method requires a Specification Name argument."
I know where this argument goes but I can't find an example of one. I remember off the top of my head something along time ago what might go there... like was it like "MS DOS" or "DOS TEXT" I can't remember and I can't find an example.
My other program can't use the " I just want to get rid of that.
The code below works fine, but the end resulted text adds character 32 " to my results:
-------------------------------------------
Private Sub Command0_Click()
'check if file is there- if so, deletes it
If Len(Dir("C:\temp\ET.txt")) = 0 Then
GoTo skipper
Else
Kill ("C:\temp\ET.txt")
End If
skipper:
'queries to fill up my table
DoCmd.OpenQuery "Stage 1_ clean"
DoCmd.OpenQuery "Stage_1_Fill"
DoCmd.OpenQuery "Stage_1_Fill_ENDENDE"
DoCmd.TransferText acExportDelim, , "Stage one", "c:\temp\ET.txt", False
'popup telling user what the next step in the process is.
MsgBox "Ok- please run SABRE script " & Chr(34) & "utkt1" & Chr(34) & Chr(13) & "Then return here and run the second stage", vbOKOnly, "Done"
End Sub
------------------------------------------------------
This is the data in my table:
O2VC88
O2VC89
O2VC91
O2VC92
This is how it come out in the text file:
"O2VC88"
"O2VC89"
"O2VC91"
"O2VC92"
Why is this quote character there? I don't want it there. How do I get rid of it?
I have tried to change the transfertext to "acExportFixed" thinking perhaps this had soemthing to do with it, but I get this error message:
"The action of method requires a Specification Name argument."
I know where this argument goes but I can't find an example of one. I remember off the top of my head something along time ago what might go there... like was it like "MS DOS" or "DOS TEXT" I can't remember and I can't find an example.
My other program can't use the " I just want to get rid of that.