Filter by form - clear grid when form opens

Filter by form - clear grid when form opens

Post by John » Mon, 20 Nov 2006 13:36:49


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.
 
 
 

Filter by form - clear grid when form opens

Post by Tom van St » Mon, 20 Nov 2006 14:11:12

On Sun, 19 Nov 2006 04:36:49 -0000, "JohnM" < XXXX@XXXXX.COM >


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

-Tom.

 
 
 

Filter by form - clear grid when form opens

Post by Granny Spi » Tue, 21 Nov 2006 02:30:53


In the form's open event:

Me.FilterOn = False
RunCommand acCmdClearGrid

In the form's unload event:

Me.Filter = ""

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