Pesky filters

S

Stuart

I have a form, with a datasheet subform that I allow the
user to filter and sort as desired. Sometimes the user
filter and sort criteria get written to the subform's
filter property. I have tried to start up the form by
putting ME.FILTER = "" and ME.ORDERBY = "" in the OnOpen
for the form, but it does not erase them. Tried On Load
too. Any suggestions?

Thanks, Stuart
 
G

Graham Mandeno

Hi Stuart

Me.Filter="" and Me.OrderBy="" should definitely erase both those
properties.

You can also try Me.FilterOn=false and Me.OrderByOn=False.

Are you saying that after executing the statement Me.Filter="", your records
are still being filtered?
 
S

Stuart

When I am testing, the data is not being filtered, but if
you look at the property sheet, the user-generated
filters and sort sequences are sitting there in the
appointed spots. Users claim sometimes the old filters
are hanging on. If I go into the debug window and
type "? me.filter" it says it is blank, but I can look at
it and see it in the property sheet. This is Access97 by
the way, perhaps that is relevant.

Regards, Stuart

-----Original Message-----
Hi Stuart

Me.Filter="" and Me.OrderBy="" should definitely erase both those
properties.

You can also try Me.FilterOn=false and Me.OrderByOn=False.

Are you saying that after executing the statement Me.Filter="", your records
are still being filtered?

--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

I have a form, with a datasheet subform that I allow the
user to filter and sort as desired. Sometimes the user
filter and sort criteria get written to the subform's
filter property. I have tried to start up the form by
putting ME.FILTER = "" and ME.ORDERBY = "" in the OnOpen
for the form, but it does not erase them. Tried On Load
too. Any suggestions?

Thanks, Stuart


.
 
S

SFAxess

Make sure you put
me.FilterOn=False
me.OrderByOn=False
as well
If they are using the toolbar button to filter or sort
you are OK, if you have code that does it, make sure you
activate the FilterOn or OrderbyOn properties.
Also, the code must be in the subform's code module, not
that of the parent form.
 
G

Graham Mandeno

Filter and OrderBy should only persist in design view if the user saves the
form while they are set. You could try turning them off in Form_Unload as
well if it bothers you.

Either way, if you are clearing and turniong off Filter and OrderBy in
Form_Load, they should not persist in such a way as to be noticed by the
users.

--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

Stuart said:
When I am testing, the data is not being filtered, but if
you look at the property sheet, the user-generated
filters and sort sequences are sitting there in the
appointed spots. Users claim sometimes the old filters
are hanging on. If I go into the debug window and
type "? me.filter" it says it is blank, but I can look at
it and see it in the property sheet. This is Access97 by
the way, perhaps that is relevant.

Regards, Stuart

-----Original Message-----
Hi Stuart

Me.Filter="" and Me.OrderBy="" should definitely erase both those
properties.

You can also try Me.FilterOn=false and Me.OrderByOn=False.

Are you saying that after executing the statement Me.Filter="", your records
are still being filtered?

--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

I have a form, with a datasheet subform that I allow the
user to filter and sort as desired. Sometimes the user
filter and sort criteria get written to the subform's
filter property. I have tried to start up the form by
putting ME.FILTER = "" and ME.ORDERBY = "" in the OnOpen
for the form, but it does not erase them. Tried On Load
too. Any suggestions?

Thanks, Stuart


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top