473,395 Members | 1,647 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Clear filters and save doesn't stick.

I'm trying to defeat persistant filters with the following code in
Close, and also in Unload:

Private Sub Form_Close()
DoCmd.RunCommand acCmdRemoveFilterSort
Me.FilterOn = False
Me.OrderByOn = False
Me.ServerFilterByForm = False
My.OrderBy = ""
Me.Filter = ""
Me.ServerFilter = ""
DoCmd.Save acForm, Me.Name
DoCmd.RunCommand acCmdSave
End Sub

Somehow the user applied filters stills get saved. I'm not sure what
else to do.

Nov 13 '05 #1
1 1807
Ok, I removed the onclose and onunload code and just put this copde in
the Form OnOpen event. Now the filters applied by the user don't get
saved. I don't understand how this works, as the OnOpen event fires
before the user edits the filters, but somehow it prevents them from
saving filters on the form.

But putting it in OnOpen creates other problems for me, but I think I
can resolve them.

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
by: Tim Mierzejewski | last post by:
How do I clear the text from my screen, other than a bunch of \n's or endl's? Tim M.
4
by: Aaron | last post by:
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...
69
by: DeJuan Jackson | last post by:
Just dropping a quick not for Tom Lane. I sent a personal message today, but I wasn't sure if you'd get it after I remembered all of the spam filters you've got set up. Sorry for the off topic...
6
by: TJO | last post by:
Below is some sample code that fades div tags that is not working in IE 6.0.29 on xp sp2. Can anyone help see why the if(ie5) document.getElementById(divID).filters.alpha.opacity lines are not...
1
by: laurakr | last post by:
I am trying to use a clear to get my bottom nav bar below the quote box on the right, but it isn't working. I would like the bottom edge of the quote box to "stick" to the footer nav bar but copy...
4
by: jois.de.vivre | last post by:
I'm having some unexpected behavior regarding clear() in the map container. I have the following code: /// --- begin code #include <map> #include <vector> #include <iostream> #include...
18
by: Marko.Cain.23 | last post by:
Hi, I create a dictionary like this myDict = {} and I add entry like this: myDict = 1 but how can I empty the whole dictionary? Thank you.
1
by: Matthew Wilson | last post by:
The python logging module is a beautiful masterpiece. I'm studying filters and the config-file approach. Is it possible to define a filter somehow and then refer to it in my config file? TIA ...
1
by: not_a_commie | last post by:
Here are a few thoughts for loading and storing your xml using the XmlDocument class: First, don't ever insert the header manually. This is to be done by the writer. In other words, don't do...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.