Daren Anderson, MSIS
asked on
Access 2007 Specification Export
I created a specification in Access 2007 to export information from a query to a comma delimited file (.csv) and I was trying to use the switchboard to create a command to run code to run the export. However when I try to run it - I get "The text file specification "NewCarrier Export" does not exist. You cannot import, export, or link using the specification. What am I doing wrong?
Thanks.
Thanks.
how did you create the specification "NewCarrier Export" ?
...and did you spell it correctly?
"NewCarrier Export"
"New Carrier Export"
"New Carrier"
"NewCarrier"
...etc
"NewCarrier Export"
"New Carrier Export"
"New Carrier"
"NewCarrier"
...etc
ASKER
Sorry was out on a customer install - here is the code and yes, I did try to recreate the export as well - as you can see by my commented out code...
Function CarrierExport()
On Error GoTo CarrierExport_Err
'Perform Export functionC
'DoCmd.TransferText acExportDelim, "New Carrier Factor Exports", "qryExportLeads", "C:\Documents and Settings\Owner\My Documents\CarrierFactor\Ex ports.csv"
DoCmd.TransferText acExportDelim, "NewCarrierExport", "qryExportLeads", "C:\Exports.csv"
CarrierExport_Exit:
Exit Function
CarrierExport_Err:
MsgBox Error$
Resume CarrierExport_Exit
End Function
Function CarrierExport()
On Error GoTo CarrierExport_Err
'Perform Export functionC
'DoCmd.TransferText acExportDelim, "New Carrier Factor Exports", "qryExportLeads", "C:\Documents and Settings\Owner\My Documents\CarrierFactor\Ex
DoCmd.TransferText acExportDelim, "NewCarrierExport", "qryExportLeads", "C:\Exports.csv"
CarrierExport_Exit:
Exit Function
CarrierExport_Err:
MsgBox Error$
Resume CarrierExport_Exit
End Function
my question is HOW did you create the specification "NewCarrierExport" ?
ASKER
I created it thru the wizard and saved the export steps.....
try this
docmd.runcommand acCmdSavedExports "NewCarrierExport"
docmd.runcommand acCmdSavedExports "NewCarrierExport"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Saved the Export "Steps" or Export "Specs'?
Be sure in the wizard you saved the "Export Specification"
And make certain, you are spelling it correctly
untitled1.JPG
Be sure in the wizard you saved the "Export Specification"
And make certain, you are spelling it correctly
untitled1.JPG
J.