Link to home
Start Free TrialLog in
Avatar of Daren Anderson, MSIS
Daren Anderson, MSISFlag for United States of America

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.
Avatar of JAMcDo
JAMcDo
Flag of Canada image

Can you post the code?

J.
Avatar of Rey Obrero (Capricorn1)
how did you create the specification  "NewCarrier Export" ?
...and did you spell it correctly?

"NewCarrier Export"
"New Carrier Export"
"New Carrier"
"NewCarrier"
...etc
Avatar of Daren Anderson, MSIS

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\Exports.csv"
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" ?
I created it thru the wizard and saved the export steps.....
try this

docmd.runcommand acCmdSavedExports "NewCarrierExport"

ASKER CERTIFIED SOLUTION
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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