473,657 Members | 2,458 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.RunComman d acCmdRemoveFilt erSort
Me.FilterOn = False
Me.OrderByOn = False
Me.ServerFilter ByForm = False
My.OrderBy = ""
Me.Filter = ""
Me.ServerFilter = ""
DoCmd.Save acForm, Me.Name
DoCmd.RunComman d acCmdSave
End Sub

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

Nov 13 '05 #1
1 1819
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
59621
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
11299
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 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.
69
6378
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 post. ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html
6
6348
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 working ? I cannot find a solution yet. THanks <script type="text/javascript" language=javascript> var ie5 = (document.all && document.getElementById); var ns6 = (!document.all && document.getElementById);
1
2037
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 to be able to flow to the left of the quote box. For the bonus round I would like the right edge of the box to align with the right edge of the footer Could someone take a look at my code and help a newbie troubleshoot? my email is lroeder at...
4
5057
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 <boost/shared_ptr.hpp> using namespace std;
18
2961
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
2098
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 Matt
1
1763
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 this: document.AppendChild(document.CreateXmlDeclaration("1.0", "UTF-8", null)); If you do that and then write your document to a stream with an
0
8420
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
8516
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8617
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6176
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2743
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1970
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.