+ Reply to Thread
Results 1 to 2 of 2

Get Table sort and filter properties (VBA)

  1. #1
    Registered User
    Join Date
    01-17-2020
    Location
    Boston
    MS-Off Ver
    2010 - 2019
    Posts
    1

    Get Table sort and filter properties (VBA)

    Hello!

    I am working on a vba script that will evaluate how a table's columns are currently filtered and sorted, [run some code which requires the sorting and filtering to be cleared], and then return the table to how it was previously sorted and/or filtered.

    I know how to sort and filter a table to a desired state using VBA but i dont know how to read and store the current settings from a table to be re-applied at a later point in the code.

    Thank you in advance!

  2. #2
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    996

    Re: Get Table sort and filter properties (VBA)

    the filter / sort is on the form:

    me.filter= "[state]='" & cboState & "'"
    me.filterOn = true

    msgbox me.filteron

    and the table property:

    dim tdf as tabledef
    set tdf = currentdb.tabledefs("tMyTAble")

    msgbox tdf.filter

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1