Results 1 to 2 of 2
  1. #1
    Mahendra1000 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2013
    Posts
    101

    Macros for exporting search results into excel?


    Hello,

    I just wanted to export the search results into excel files. I have googled about it and I found the VBA code for exporting, which didn't worked out for me.

    I used Macros by referencing one of the tutorial and it looks fine. Does the usage of macros for exporting the data into excel is also the correct procedure?

    I have seen lot of suggestions to VBA coding and I haven't find a single post in all forums regarding usage of macros for exporting data.

    Does macros's for exporting has been newly introduced?

    I just wanted to know that am I on the right track?

    Thanks

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    Yes, a macro can do it. (Tho limiting)
    Your search query, qsFind, is put in the macro command, ImportExport.
    The limiting part is, it uses the same file...

    With a little VB code you can export to a new file every time...
    STabName ="Expoert"
    vFile = "c:\folder\myFile" & format(date,"yyyymmdd-hhnn") & ".xlsx"
    docmd.transferspreadsheet acformat , "qsFind", vFile, sTabName

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

Similar Threads

  1. Replies: 10
    Last Post: 01-08-2015, 06:16 AM
  2. Exporting filtered results to Excel
    By doublec9 in forum Import/Export Data
    Replies: 2
    Last Post: 06-04-2013, 09:05 PM
  3. Replies: 3
    Last Post: 02-09-2013, 09:23 PM
  4. Exporting Query results to Excel with VBA
    By Tomlon in forum Programming
    Replies: 1
    Last Post: 01-29-2013, 09:56 PM
  5. Exporting Query Results to an existing Excel Workbook
    By Dnphm in forum Import/Export Data
    Replies: 3
    Last Post: 07-13-2010, 11:40 AM

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