Results 1 to 3 of 3
  1. #1
    MTSPEER is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2013
    Posts
    283

    Exporting Filtered Data from subform

    Hello,



    I have a subform on my main form and have textboxes that the user types in and a button to filter the table based on the criteria. The subform is from a table. But when I use my export button to export the filtered data to an excel file it doesn't export just the filtered data. It exports every record from that table. Idk if you can build a query to show the records of the filtered subform an export the query? If anyone could help I would appreciate it. Thanks

  2. #2
    vicsaccess's Avatar
    vicsaccess is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Apr 2015
    Posts
    451
    have you tried using a SQl? not sure how or where your text boxes do your filter but maybe something like-
    Code:
    dim sql as String
    sql=(select blahblah FROM blahblah WHERE (blah= & '"txtblah"'&)
    docmd.TransferSpreadsheet,acSpreadsheetTypeExcel12,sql

  3. #3
    MTSPEER is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2013
    Posts
    283
    I have multiple textboxes for filtering and queries for everything would be much more difficult

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

Similar Threads

  1. Can't export data in a filtered subform only
    By mayestom in forum Macros
    Replies: 30
    Last Post: 08-11-2014, 09:23 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. DCount on filtered subform
    By TheShabz in forum Forms
    Replies: 2
    Last Post: 07-13-2011, 02:22 PM
  4. Displaying filtered data in subform
    By crxftw in forum Forms
    Replies: 11
    Last Post: 06-17-2011, 09:59 AM
  5. Exporting Pivot Table to Excell - only want filtered records
    By Jennifer227 in forum Import/Export Data
    Replies: 1
    Last Post: 04-01-2011, 03:10 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