Turn off filter and sort on loading

S

Sam Wardill

I want to turn off filter and sort on loading a form (i.e. just use the sort
in the underlying query). What code do I use to disable filter and sort?
 
S

Stefan Hoffmann

hi Sam,

Sam said:
I want to turn off filter and sort on loading a form (i.e. just use the sort
in the underlying query). What code do I use to disable filter and sort?
Ues the On Load event of your form:

Me.FilterOn = False
Me.OrderByOn = False

mfG
--> stefan <--
 
K

Klatuu

You don't need any code. Just set the forms filter and filteron properties
in design view. If you later want to filter while the form is open, that is
okay.
 
Top