Results 1 to 4 of 4
  1. #1
    VAer's Avatar
    VAer is offline Competent Performer
    Windows 10 Access 2013 32bit
    Join Date
    Sep 2016
    Location
    USA
    Posts
    163

    Access: How to export filter table?

    For example, I have a table with 1 million records in total, but if I filter column A, and the filtered table has only 3000 records. Now I only want to export those 3000 records, how should I do that?



    When I click External Data > Excel, it will export all the one million records anyway, which takes longer time and it is not what I want either. How should I export only those 3000 records (after being filtered)?

    Thanks.

    Edit (Another question): The table is linked ODBC table, it actually takes a while to open the table (since there is 1 million record). Is there a way to filter it first before opening the table? In other word, right now I do it in three steps: 1) Open the table with 1 million record; 2) Filter the table and the result has 3000 records; 3) Export the filtered 3000 record, but the system exports 1 million records anyway. Now I would like to do it in below steps: 1) Filter the table first; 2) Open filtered table; 3) Export filtered records. Is it possible? The issue is: there are many millions of records in linked ODBC table and it takes quite a while to open it (although I only said 1 million to make the question easier to understand), I don't want to open the whole table, I only want to open the filtered table, is it possible to filter a table before opening the whole table(with all the records)?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Options:

    1. export a parameterized query

    2. export a simple report filtered for desired records
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,250
    What is the back-end? You should consider using a stored procedure in the back-end database or a pass-through query in the Access front-end to provide the filtering parameters required. There is a lot of info on this if to search for "access pass-through parameter query", here is one very relevant:
    https://stackoverflow.com/questions/...-to-sql-server

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  4. #4
    DittoBird's Avatar
    DittoBird is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Apr 2015
    Location
    Newfoundland & Labrador, Canada
    Posts
    59
    Quote Originally Posted by VAer View Post
    For example, I have a table with 1 million records in total, but if I filter column A, and the filtered table has only 3000 records. Now I only want to export those 3000 records, how should I do that?

    When I click External Data > Excel, it will export all the one million records anyway, which takes longer time and it is not what I want either. How should I export only those 3000 records (after being filtered)?

    Thanks.

    Edit (Another question): The table is linked ODBC table, it actually takes a while to open the table (since there is 1 million record). Is there a way to filter it first before opening the table? In other word, right now I do it in three steps: 1) Open the table with 1 million record; 2) Filter the table and the result has 3000 records; 3) Export the filtered 3000 record, but the system exports 1 million records anyway. Now I would like to do it in below steps: 1) Filter the table first; 2) Open filtered table; 3) Export filtered records. Is it possible? The issue is: there are many millions of records in linked ODBC table and it takes quite a while to open it (although I only said 1 million to make the question easier to understand), I don't want to open the whole table, I only want to open the filtered table, is it possible to filter a table before opening the whole table(with all the records)?
    My experience was with Oracle as a back end, though I mostly used pass-through SELECT statements created by VBA based on choices made by the user. However, I did occasionally linked tables. Have you tried making a query in Access against your linked table? I am pretty sure that will speed up your retrieval, especially if your Access query where clause is against fields on the linked table that are indexed.

    Unless someone pounces on me here for my statement above, it should be simply to test this very quickly.

    Hope this helps.
    --
    Tim

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

Similar Threads

  1. Export Filtered table to Excel, Edit and Re-Import Changes to Access Table
    By Access_throwaway in forum Import/Export Data
    Replies: 15
    Last Post: 02-20-2018, 12:37 PM
  2. Replies: 17
    Last Post: 06-20-2017, 12:27 PM
  3. Export Data from Access 2003 Table to SQL Server 2012 Table.
    By Robeen in forum Import/Export Data
    Replies: 3
    Last Post: 02-26-2016, 02:07 PM
  4. export access table by using VBA code.
    By tariq nawaz in forum Import/Export Data
    Replies: 1
    Last Post: 10-11-2012, 04:23 PM
  5. export Access table as .csv
    By Nancy in forum Import/Export Data
    Replies: 1
    Last Post: 02-13-2011, 04:09 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