By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,998 Members | 2,837 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,998 IT Pros & Developers. It's quick & easy.

Clear filters

P: n/a
Hello all.

I am trying to avoid my users from saving filters. The fact is that
after they use or change a filter, when closing the form Access would
ask: "Do you want to save changes to the design of form?" and save the
new filter.

I've tried using Me.Filter = "" in the unload event, but Access asks
and saves BEFORE getting to the unload, and it saves the filter before
I clear it.

Also tried setting the property "Allow design changes" to "Design view
only" but functionality remains the same: users CAN change the design
(filters in this case) to the form, so it seems the property doesn't
work as intended.

I don't want to write code in a button as has been suggested to clear
the QBF grid, I just want to avoid saving the filters and being
prompted to save the form, which confuses them.

Would be glad to hear any suggestions from you.

TIA,

Nov 13 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
jv
Perhaps you should disable the form's control box and close button.
Then add a close command button to the form. In the onclick event of
the button, put: DoCmd.Close , , acSaveNo

There is probably better solutions but this is the first one to my
mind.

Nov 13 '05 #2

P: n/a
Yeah, that is what I am up to, but didn't want to add a new button to
an already crowded form.

Thanks.

Nov 13 '05 #3

P: n/a
"Aaron" <ar********@yahoo.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
Hello all.

I am trying to avoid my users from saving filters. The fact is that
after they use or change a filter, when closing the form Access would
ask: "Do you want to save changes to the design of form?" and save the
new filter.

I've tried using Me.Filter = "" in the unload event, but Access asks
and saves BEFORE getting to the unload, and it saves the filter before
I clear it.

Also tried setting the property "Allow design changes" to "Design view
only" but functionality remains the same: users CAN change the design
(filters in this case) to the form, so it seems the property doesn't
work as intended.

I don't want to write code in a button as has been suggested to clear
the QBF grid, I just want to avoid saving the filters and being
prompted to save the form, which confuses them.

Would be glad to hear any suggestions from you.

TIA,


Why not put Me.Filter="" in the form load event?
Fred Zuckerman
Nov 13 '05 #4

P: n/a
Thanks all for your replies.

I will stay with the Open or Load events cleaning the filter, and
adding a button to close and call DoCmd.Close acSaveNo.

I couldn't use the Close event because by the time the Unload or Close
get control, the form has already been saved with the filter.

Thanks again!

Nov 13 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.