Results 1 to 2 of 2
  1. #1
    bcn1988 is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2012
    Posts
    7

    Export Spec Type

    Hello!

    I am using VBA to automate a process of importing and exporting queries. I would like to save a specification type for EXPORTING. I have already saved specification types for my imports. So, once I run the query I go to External Data > Export > Excel.

    However once I do this, and I name the file, select file format, select "Export data with formatting and layout" > click ok. Shouldnt the next menu have an advanced option for my specification types? The export wizard is missing..how do I save my spec types for an Export? I'm at a loss, please help!

    My VB code is below. I sometimes get an error saying: Run-time error '3274': External table is not in the expected format

    I think this has to do with having no spec type saved for Exporting. But I can't figure out for the life of me how to save Export Specifications. HELP!

    Sub Export_Queries()
    Dim TheDate As String
    Dim TheDate1 As String
    Dim OutputPath As String
    Dim strQryName1 As String
    Dim strQryName2 As String
    Dim strQryName3 As String
    Dim strQryName4 As String
    Dim strQryName5 As String
    Dim strQryName6 As String
    Dim strQryName7 As String
    Dim strQryName8 As String
    Dim strQryName9 As String
    Dim strXLFile1 As String
    Dim tblName1 As String

    TheDate = Format(Date, "MM-DD-YYYY")
    TheDate1 = Format(Date, "MMDDYYYY")
    OutputPath = "C:\Documents and Settings\htq972\Desktop\Work Files\POR Reports\POR & PMOR Files\" & TheDate & "\" & "Queries_" & TheDate & "\"
    strQryName1 = "EXPORT Overview_Test"
    strQryName2 = "Exp_DQ_Final"
    strQryName3 = "Export Data Quality"
    strQryName4 = "RiskIssueExport"
    strQryName5 = "Exp_En_Schedule_Final_Formulas"
    strQryName6 = "EXPORT Status -5 wks"
    strQryName7 = "EXPORT Oversight"
    strQryName8 = "EXPORT RawData-PMOR"
    strQryName9 = "PMOR_ComboBoxValues_Use This"
    strXLFile1 = OutputPath & "POR Export Raw_" & TheDate1 & ".xls"
    tblName1 = "ca-Change Requests Details"
    DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, strQryName1, strXLFile1, True
    DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, strQryName2, strXLFile1, True
    DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, strQryName3, strXLFile1, True


    DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, strQryName4, strXLFile1, True
    DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, strQryName5, strXLFile1, True
    DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, strQryName6, strXLFile1, True
    DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, strQryName7, strXLFile1, True
    DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, strQryName8, strXLFile1, True
    DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, strQryName9, strXLFile1, True
    DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, tblName1, strXLFile1, True
    End Sub

  2. #2
    bcn1988 is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2012
    Posts
    7
    Anyone? Please help!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Docmd.TransferText Spec File Not Found
    By Patrick.Grant01 in forum Programming
    Replies: 7
    Last Post: 05-22-2012, 09:32 AM
  2. Set default export file type for queries
    By Lady_Jane in forum Import/Export Data
    Replies: 1
    Last Post: 03-29-2012, 04:53 PM
  3. Choose Import Spec from option group
    By thart21 in forum Import/Export Data
    Replies: 4
    Last Post: 06-29-2011, 10:37 AM
  4. Need Helpto Export Access Table to .txt type SDF
    By Kishwar in forum Import/Export Data
    Replies: 2
    Last Post: 05-17-2010, 10:07 AM
  5. Replies: 2
    Last Post: 03-18-2010, 08:24 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums