Results 1 to 3 of 3
  1. #1
    KathyL is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Aug 2010
    Posts
    94

    How do you get a system variable for a system Filter

    I have a form with a tab control, multiple tabs.

    Tab 1 and Tab 2 are just different data sheets against the same data (very wide data sheets).

    I want to use a standard Access Filter on the first tab, and then when I click to go to the 2nd tab, I want that data sheet to filter to the same subset of records.



    How do I get at Access system variables with Visual Basic so that I can set the 2nd tab to the same filter? ( I know I can design custom queries and use them between tabs, but I want the user to be able to use the system provided filter functions.)

    Thank you in advance for any help you can give.

  2. #2
    NoellaG's Avatar
    NoellaG is offline VIP
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jun 2010
    Location
    Belgium
    Posts
    1,035
    Hi Cathy,

    I suppose the 2 datasheets are 2 subforms on a main form. You can use the after click event of the tab to set the filter for the other dataset:
    me.NameOfTheSubformControl2.Form.Filter = me.NameOfTheSubformControl1.Form.Filter
    me.NameOfTheSubformControl1.Form.FilterOn = true

    greetings
    NG

  3. #3
    KathyL is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Aug 2010
    Posts
    94
    Quote Originally Posted by NoellaG View Post
    Hi Cathy,

    I suppose the 2 datasheets are 2 subforms on a main form. You can use the after click event of the tab to set the filter for the other dataset:
    me.NameOfTheSubformControl2.Form.Filter = me.NameOfTheSubformControl1.Form.Filter
    me.NameOfTheSubformControl1.Form.FilterOn = true

    greetings
    NG
    NG, it works, THANKS!
    (except the filteron had to be on control 2... same as tab clicked)

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

Similar Threads

  1. SYSTEM.MDW MS Access 2007.
    By SIGMA248 in forum Access
    Replies: 2
    Last Post: 03-21-2011, 05:52 AM
  2. Inventory System
    By Rawb in forum Database Design
    Replies: 8
    Last Post: 01-05-2011, 07:26 AM
  3. Ordering System
    By Gustavo in forum Access
    Replies: 1
    Last Post: 11-21-2010, 02:16 AM
  4. Replies: 0
    Last Post: 03-09-2009, 03:09 PM
  5. System.mdb or System.mdw?
    By cgriella in forum Access
    Replies: 1
    Last Post: 09-30-2008, 08:16 AM

Tags for this Thread

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