Results 1 to 4 of 4
  1. #1
    nhylan is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    12

    adding a footer to an export

    Hello,

    I need to add a static footer ("limited access") to a query I export. Is there a simple way to do this given the code I'm using?

    Private Sub Command58_Click()
    DoCmd.OutputTo acOutputQuery, "Query Union", "ExcelWorkbook(*.xlsx)", "\\mflccg02\lib\stevez\Blackrock\Trade Processing Team\foreign exchange\FX Files\BBH_Foreign_Exchange " & Format(Date, "mm-dd-yyyy") & ".xlsx", True, "", , acExportQualityPrint
    DoCmd.SetWarnings False
    DoCmd.OpenQuery "AppendNonAgent", acViewNormal, acEdit
    DoCmd.SetWarnings False
    DoCmd.OpenQuery "AppendAgent", acViewNormal, acEdit
    End Sub

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    The first way that comes to mind is to export a UNION query that adds the footer line to the end of the existing query.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    nhylan is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    12
    Thanks, is there a way to do that using SQL? I have very limited experience using access so any help is greatly appreciated.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    A UNION query is SQL:

    SELECT Field1, Field2
    FROM OneSource
    UNION ALL
    SELECT Field1, Field2
    FROM AnotherSource
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Footer in Reporting
    By gatsby in forum Access
    Replies: 2
    Last Post: 03-12-2013, 09:06 PM
  2. header and footer
    By slimjen in forum Forms
    Replies: 2
    Last Post: 10-03-2011, 08:10 PM
  3. Sum in Form footer
    By NISMOJim in forum Forms
    Replies: 3
    Last Post: 01-17-2011, 09:11 AM
  4. Page Footer
    By jamil_kwi in forum Access
    Replies: 1
    Last Post: 05-31-2010, 04:02 AM
  5. Need help with values in the footer
    By allochthonous in forum Reports
    Replies: 0
    Last Post: 03-03-2007, 08:20 PM

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