Filter by form - clear grid when form opens

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • JohnM

    #1

    Filter by form - clear grid when form opens

    When a form opens, the most recently used filter is retained. How do I set
    it to clear the grid when it opens (or when it closes for that matter)?
    I'm using docmd.openform to open it.


  • Tom van Stiphout

    #2
    Re: Filter by form - clear grid when form opens

    On Sun, 19 Nov 2006 04:36:49 -0000, "JohnM" <john@jmawer.de mon.co.uk>
    wrote:

    In the Form_Open event write:
    Me.Filter = ""

    -Tom.

    >When a form opens, the most recently used filter is retained. How do I set
    >it to clear the grid when it opens (or when it closes for that matter)?
    >I'm using docmd.openform to open it.
    >

    Comment

    • Granny Spitz via AccessMonster.com

      #3
      Re: Filter by form - clear grid when form opens

      JohnM wrote:
      When a form opens, the most recently used filter is retained. How do I set
      it to clear the grid when it opens (or when it closes for that matter)?
      In the form's open event:

      Me.FilterOn = False
      RunCommand acCmdClearGrid

      In the form's unload event:

      Me.Filter = ""

      --
      Message posted via http://www.accessmonster.com

      Comment

      Working...