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

OnApply Event doesn't act as documented

P: n/a
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Access 2002 & 2003. Windows XP Professional O/S.

According to the Access Help article "ApplyFilter Event" the
"...ApplyFilter event occurs when the user does one of the following:"

"Filter menu in the Filter window, or clicks Apply Filter on the
toolbar...." Yes, the event fires when this happens.

"Clicks Remove Filter/Sort on the Records menu in Form view, or clicks
Remove Filter on the toolbar...." No, the event doesn't fire when this
happens.

I've tested this in both Access 2002 & 2003 .mdb files. The same
results occurred in both versions.

Does anybody know if there is a fix or workaround that will allow the
code to "know" when the "Remove Filter/Sort" has occurred? An API
function, perhaps?
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQtgBVIechKqOuFEgEQKeUwCfSFg3nziebojN5m6iFRDTmR 3TztkAn1n9
TptFgwolKAjklD/PDH7hv3Pb
=nE0G
-----END PGP SIGNATURE-----
Nov 13 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
On Fri, 15 Jul 2005 18:32:45 GMT, MGFoster <me@privacy.com> wrote:

That's not my experience. I added a debug.print to the OnApplyFilter
event in a form in the Northwind sample application, and it fires both
when filtering, and when unfiltering.
This is Access 2003 SP1 (build 6360) on Windows XP SP2

-Tom.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Access 2002 & 2003. Windows XP Professional O/S.

According to the Access Help article "ApplyFilter Event" the
"...ApplyFilter event occurs when the user does one of the following:"

"Filter menu in the Filter window, or clicks Apply Filter on the
toolbar...." Yes, the event fires when this happens.

"Clicks Remove Filter/Sort on the Records menu in Form view, or clicks
Remove Filter on the toolbar...." No, the event doesn't fire when this
happens.

I've tested this in both Access 2002 & 2003 .mdb files. The same
results occurred in both versions.

Does anybody know if there is a fix or workaround that will allow the
code to "know" when the "Remove Filter/Sort" has occurred? An API
function, perhaps?


Nov 13 '05 #2

P: n/a
On Fri, 15 Jul 2005 18:32:45 GMT, MGFoster <me@privacy.com> wrote:

That's not my experience. I added a debug.print to the OnApplyFilter
event in a form in the Northwind sample application, and it fires both
when filtering, and when unfiltering.
This is Access 2003 SP1 (build 6360) on Windows XP SP2

-Tom.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Access 2002 & 2003. Windows XP Professional O/S.

According to the Access Help article "ApplyFilter Event" the
"...ApplyFilter event occurs when the user does one of the following:"

"Filter menu in the Filter window, or clicks Apply Filter on the
toolbar...." Yes, the event fires when this happens.

"Clicks Remove Filter/Sort on the Records menu in Form view, or clicks
Remove Filter on the toolbar...." No, the event doesn't fire when this
happens.

I've tested this in both Access 2002 & 2003 .mdb files. The same
results occurred in both versions.

Does anybody know if there is a fix or workaround that will allow the
code to "know" when the "Remove Filter/Sort" has occurred? An API
function, perhaps?


Nov 13 '05 #3

P: n/a
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thanks for the response.

Access 2002 SP3.

I found that when the form is a datasheet and it is used as a subform,
the OnApplyFilter event fires when the filter is applied, but, when the
filter is removed the OnApplyFilter event doesn't fire. If the
datasheet is NOT a subform, the OnApplyFilter fires both when the filter
is applied & when it is removed. I used the same form both as a subform
and as a free-standing form to test the above. Looks like an
undocumented gotcha.

This still begs the question: How to get the Remove Filter part of the
OnApplyFilter event to be recognized by subforms? Since Access doesn't
do it, is there an API I can use?
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQtiUZoechKqOuFEgEQKv3wCgti+cQbfxuisSflm2pPY9kQ IrE/AAnjmA
TLVjKc9ADTYzBHpIjo9F1vHL
=I/jx
-----END PGP SIGNATURE-----

Tom van Stiphout wrote:
On Fri, 15 Jul 2005 18:32:45 GMT, MGFoster <me@privacy.com> wrote:

That's not my experience. I added a debug.print to the OnApplyFilter
event in a form in the Northwind sample application, and it fires both
when filtering, and when unfiltering.
This is Access 2003 SP1 (build 6360) on Windows XP SP2

-Tom.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Access 2002 & 2003. Windows XP Professional O/S.

According to the Access Help article "ApplyFilter Event" the
"...ApplyFilter event occurs when the user does one of the following:"

"Filter menu in the Filter window, or clicks Apply Filter on the
toolbar...." Yes, the event fires when this happens.

"Clicks Remove Filter/Sort on the Records menu in Form view, or clicks
Remove Filter on the toolbar...." No, the event doesn't fire when this
happens.

I've tested this in both Access 2002 & 2003 .mdb files. The same
results occurred in both versions.

Does anybody know if there is a fix or workaround that will allow the
code to "know" when the "Remove Filter/Sort" has occurred? An API
function, perhaps?


Nov 13 '05 #4

P: n/a
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thanks for the response.

Access 2002 SP3.

I found that when the form is a datasheet and it is used as a subform,
the OnApplyFilter event fires when the filter is applied, but, when the
filter is removed the OnApplyFilter event doesn't fire. If the
datasheet is NOT a subform, the OnApplyFilter fires both when the filter
is applied & when it is removed. I used the same form both as a subform
and as a free-standing form to test the above. Looks like an
undocumented gotcha.

This still begs the question: How to get the Remove Filter part of the
OnApplyFilter event to be recognized by subforms? Since Access doesn't
do it, is there an API I can use?
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQtiUZoechKqOuFEgEQKv3wCgti+cQbfxuisSflm2pPY9kQ IrE/AAnjmA
TLVjKc9ADTYzBHpIjo9F1vHL
=I/jx
-----END PGP SIGNATURE-----

Tom van Stiphout wrote:
On Fri, 15 Jul 2005 18:32:45 GMT, MGFoster <me@privacy.com> wrote:

That's not my experience. I added a debug.print to the OnApplyFilter
event in a form in the Northwind sample application, and it fires both
when filtering, and when unfiltering.
This is Access 2003 SP1 (build 6360) on Windows XP SP2

-Tom.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Access 2002 & 2003. Windows XP Professional O/S.

According to the Access Help article "ApplyFilter Event" the
"...ApplyFilter event occurs when the user does one of the following:"

"Filter menu in the Filter window, or clicks Apply Filter on the
toolbar...." Yes, the event fires when this happens.

"Clicks Remove Filter/Sort on the Records menu in Form view, or clicks
Remove Filter on the toolbar...." No, the event doesn't fire when this
happens.

I've tested this in both Access 2002 & 2003 .mdb files. The same
results occurred in both versions.

Does anybody know if there is a fix or workaround that will allow the
code to "know" when the "Remove Filter/Sort" has occurred? An API
function, perhaps?


Nov 13 '05 #5

P: n/a
MGFoster wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thanks for the response.

Access 2002 SP3.

I found that when the form is a datasheet and it is used as a subform,
the OnApplyFilter event fires when the filter is applied, but, when the
filter is removed the OnApplyFilter event doesn't fire. If the
datasheet is NOT a subform, the OnApplyFilter fires both when the filter
is applied & when it is removed. I used the same form both as a subform
and as a free-standing form to test the above. Looks like an
undocumented gotcha.

This still begs the question: How to get the Remove Filter part of the
OnApplyFilter event to be recognized by subforms? Since Access doesn't
do it, is there an API I can use?


Does the the subform have focus when it is pressed.

One suggestion is to create your own menu item and add it to the
menu/toolbar so it does what you want.
Nov 13 '05 #6

P: n/a
MGFoster wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thanks for the response.

Access 2002 SP3.

I found that when the form is a datasheet and it is used as a subform,
the OnApplyFilter event fires when the filter is applied, but, when the
filter is removed the OnApplyFilter event doesn't fire. If the
datasheet is NOT a subform, the OnApplyFilter fires both when the filter
is applied & when it is removed. I used the same form both as a subform
and as a free-standing form to test the above. Looks like an
undocumented gotcha.

This still begs the question: How to get the Remove Filter part of the
OnApplyFilter event to be recognized by subforms? Since Access doesn't
do it, is there an API I can use?


Does the the subform have focus when it is pressed.

One suggestion is to create your own menu item and add it to the
menu/toolbar so it does what you want.
Nov 13 '05 #7

P: n/a
Salad wrote:
MGFoster wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thanks for the response.

Access 2002 SP3.

I found that when the form is a datasheet and it is used as a subform,
the OnApplyFilter event fires when the filter is applied, but, when the
filter is removed the OnApplyFilter event doesn't fire. If the
datasheet is NOT a subform, the OnApplyFilter fires both when the filter
is applied & when it is removed. I used the same form both as a subform
and as a free-standing form to test the above. Looks like an
undocumented gotcha.

This still begs the question: How to get the Remove Filter part of the
OnApplyFilter event to be recognized by subforms? Since Access doesn't
do it, is there an API I can use?

Does the the subform have focus when it is pressed.

One suggestion is to create your own menu item and add it to the
menu/toolbar so it does what you want.


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Salad,
Do you mean create my own function for a toolbar? I had created a popup
menu to do the filter/remove filter, but used the built-in functions.

Seems a shame I can't use the built-in functions as documented - why re
invent the wheel when it supposed to already be there? It's a PITA.

Your suggestion is probably the way to go. Doesn't me I have to like it
;-).
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQtwKz4echKqOuFEgEQJeqwCfVZRgDz+zP/LowJq0/d7gYZ6Nv4UAoKfV
QVrJvvzCiN5IO5v+Ct1ac1uo
=1u3Q
-----END PGP SIGNATURE-----
Nov 13 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.