Having upgraded from ac2003 to ac2010 I wanted to export a query to a text file .In ac2003 no problem as the wizard took me through step by step .An example of ac 2003 is as follows #
#Private Sub Command665_Click()
On Error GoTo ProcError
Dim strPath As String
strPath = CurrentProject.Path
DoCmd.TransferText TransferType:=acExportDelim, _
SpecificationName:="ContactHome Source Specification", _
TableName:="qryPhoneNoOrder", _
FileName:=strPath & "\ContactHome.txt", _
HasFieldNames:=0
MsgBox "The selected Home Phone numbers have been exported " _
& "to the file ContactHome.txt" & vbCrLf _
& "in the folder:" & vbCrLf & strPath, vbInformation, _
"Export Complete..."
ExitProc:
Exit Sub
ProcError:
MsgBox "Error " & Err.Number & ": " & Err.Description, , _
"Error in cmdExportTabDelim_Click event procedure..."
Resume ExitProc
End Sub #
I followed the export to text file with no problem , but the wizard did not show me an advance tab to produce a SpecificationName as I example above , any pointers as to what I am not doing correctly would be appreciated .
Regards Ypma
#Private Sub Command665_Click()
On Error GoTo ProcError
Dim strPath As String
strPath = CurrentProject.Path
DoCmd.TransferText TransferType:=acExportDelim, _
SpecificationName:="ContactHome Source Specification", _
TableName:="qryPhoneNoOrder", _
FileName:=strPath & "\ContactHome.txt", _
HasFieldNames:=0
MsgBox "The selected Home Phone numbers have been exported " _
& "to the file ContactHome.txt" & vbCrLf _
& "in the folder:" & vbCrLf & strPath, vbInformation, _
"Export Complete..."
ExitProc:
Exit Sub
ProcError:
MsgBox "Error " & Err.Number & ": " & Err.Description, , _
"Error in cmdExportTabDelim_Click event procedure..."
Resume ExitProc
End Sub #
I followed the export to text file with no problem , but the wizard did not show me an advance tab to produce a SpecificationName as I example above , any pointers as to what I am not doing correctly would be appreciated .
Regards Ypma