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

Filter in form not working?

P: n/a
I have a form based on the query:

SELECT tblCreditGeld.CG_Selected, tblCreditGeld.CG_ClientSelected,
tblCreditGeld.CG_ComplexSelected, tblCreditGeld.CG_OKGR_ID,
tblCreditGeld.CG_OKGR_IDN, tblCreditGeld.CG_client_n,
tblCreditGeld.CG_COMP_NR, tblCreditGeld.CG_BANKREK_NR,
tblCreditGeld.CG_clientnm, tblCreditGeld.CG_K_MUNT_ISO,
tblCreditGeld.CG_GRV, tblCreditGeld.CG_kcons, tblCreditGeld.CG_unit,
tblCreditGeld.CG_Kode, tblCreditGeld.CG_Perc1,
tblCreditGeld.CG_MPerc1, tblCreditGeld.CG_Grens,
tblCreditGeld.CG_Perc2, tblCreditGeld.CG_MPerc2,
tblCreditGeld.CG_BGrens, tblCreditGeld.CG_CREDITRENTE_4,
tblCreditGeld.CG_EFF_PERC_CR_4, tblCreditGeld.CG_verrt,
tblCreditGeld.CG_CREDITRENTE_TOT, tblCreditGeld.CG_EFF_PERC_CR_TOT,
tblCreditGeld.CG_vertot, tblCreditGeld.CG_CREDITRENTE_4_C,
tblCreditGeld.CG_EFF_PERC_CR_4_C, tblCreditGeld.CG_CREDITRENTE_TOT_C,
tblCreditGeld.CG_EFF_PERC_CR_TOT_C, tblCreditGeld.CG_NAAM,
tblCreditGeld.CG_kadv, tblCreditGeld.CG_mar, tblCreditGeld.CG_martot,
tblCreditGeld.CG_kmar, tblCreditGeld.CG_kmartot,
tblCreditGeld.CG_5TON, tblCreditGeld.CG_PORTO,
tblCreditGeld.CG_Freq_Dagafschr
FROM tblCreditGeld;

The form has a filter:
((CG_OKGR_IDN) = 'A. LEUSCHEL BEHEER B.V.')
The filterproperty is set to 'True' but the filter simply does not
work. If I put this filter in de SQL as a WHERE statement it
works...............
I have tried setting the filter through a module in VBA, in the form
itself, in design mode, in normal mode, even manually but the form
just refuses to filter anything.
There is in de code nothing to find that would set the filter
otherwise, in none of the events of the form nor in any events
connected to any of the controls.................
Any suggestions as to why this form refuses to filter?
I tried compacting and repairing the database as well as importing the
whole shebang in a new database but no
resolve.......................... Only remorse.............

Thanks a lot for thinking with me, this problem is somewhat shadowing
the happiness I feel at the birth of my youngest brothers first child
(a beautiful beautiful girl that undoubtedly will be the first female
president of the United States of Europe :p) yesterday....
For those who want to share in my happiness: she is born 7th of march
@ 14:45 GMT +1!!!

Greetings, Happy Henro

Mar 8 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On 7 Mar 2007 23:48:25 -0800, "Henrootje" <He****@gmail.comwrote:

Perhaps you could remove all parentheses and try again.

Another test: run the form without filter, then select the field,
right click, filter by selection. Then in the immediate window enter:
?Forms!<yourform>.Filter
and see what it produced.

-Tom.

>I have a form based on the query:

SELECT tblCreditGeld.CG_Selected, tblCreditGeld.CG_ClientSelected,
tblCreditGeld.CG_ComplexSelected, tblCreditGeld.CG_OKGR_ID,
tblCreditGeld.CG_OKGR_IDN, tblCreditGeld.CG_client_n,
tblCreditGeld.CG_COMP_NR, tblCreditGeld.CG_BANKREK_NR,
tblCreditGeld.CG_clientnm, tblCreditGeld.CG_K_MUNT_ISO,
tblCreditGeld.CG_GRV, tblCreditGeld.CG_kcons, tblCreditGeld.CG_unit,
tblCreditGeld.CG_Kode, tblCreditGeld.CG_Perc1,
tblCreditGeld.CG_MPerc1, tblCreditGeld.CG_Grens,
tblCreditGeld.CG_Perc2, tblCreditGeld.CG_MPerc2,
tblCreditGeld.CG_BGrens, tblCreditGeld.CG_CREDITRENTE_4,
tblCreditGeld.CG_EFF_PERC_CR_4, tblCreditGeld.CG_verrt,
tblCreditGeld.CG_CREDITRENTE_TOT, tblCreditGeld.CG_EFF_PERC_CR_TOT,
tblCreditGeld.CG_vertot, tblCreditGeld.CG_CREDITRENTE_4_C,
tblCreditGeld.CG_EFF_PERC_CR_4_C, tblCreditGeld.CG_CREDITRENTE_TOT_C,
tblCreditGeld.CG_EFF_PERC_CR_TOT_C, tblCreditGeld.CG_NAAM,
tblCreditGeld.CG_kadv, tblCreditGeld.CG_mar, tblCreditGeld.CG_martot,
tblCreditGeld.CG_kmar, tblCreditGeld.CG_kmartot,
tblCreditGeld.CG_5TON, tblCreditGeld.CG_PORTO,
tblCreditGeld.CG_Freq_Dagafschr
FROM tblCreditGeld;

The form has a filter:
((CG_OKGR_IDN) = 'A. LEUSCHEL BEHEER B.V.')
The filterproperty is set to 'True' but the filter simply does not
work. If I put this filter in de SQL as a WHERE statement it
works...............
I have tried setting the filter through a module in VBA, in the form
itself, in design mode, in normal mode, even manually but the form
just refuses to filter anything.
There is in de code nothing to find that would set the filter
otherwise, in none of the events of the form nor in any events
connected to any of the controls.................
Any suggestions as to why this form refuses to filter?
I tried compacting and repairing the database as well as importing the
whole shebang in a new database but no
resolve.......................... Only remorse.............

Thanks a lot for thinking with me, this problem is somewhat shadowing
the happiness I feel at the birth of my youngest brothers first child
(a beautiful beautiful girl that undoubtedly will be the first female
president of the United States of Europe :p) yesterday....
For those who want to share in my happiness: she is born 7th of march
@ 14:45 GMT +1!!!

Greetings, Happy Henro
Mar 8 '07 #2

P: n/a
"Henrootje" <He****@gmail.comwrote in
news:11**********************@8g2000cwh.googlegrou ps.com:
I have a form based on the query:
The form has a filter:
((CG_OKGR_IDN) = 'A. LEUSCHEL BEHEER B.V.')
The filterproperty is set to 'True' but the filter simply does
not work. If I put this filter in de SQL as a WHERE statement
it works...............
I have tried setting the filter through a module in VBA, in
the form itself, in design mode, in normal mode, even manually
but the form just refuses to filter anything.
There is in de code nothing to find that would set the filter
otherwise, in none of the events of the form nor in any events
connected to any of the controls.................
Any suggestions as to why this form refuses to filter?
I tried compacting and repairing the database as well as
importing the whole shebang in a new database but no
resolve.......................... Only remorse.............
Forms also have a property: .FilterOn This must be set True for
the filter to work. You have not mentioned setting this
property. Were you aware of it and what happens if you do set
it?

The .Filter Property should contain an expression which
evaluates the records to include when the filter is on.
--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Mar 8 '07 #3

P: n/a
It turned out to be a stupid misspelling in some unused variable being
called somewhere I completely had forgotten.......
Thus filling the filter of the form with "" AND setting the filterOn
property to true :s
Nice sloppy coding :s

Sorry to bother you but thanks for thinking with me!

On 8 mrt, 23:16, Bob Quintal <rquin...@sPAmpatico.cawrote:
"Henrootje" <Hen...@gmail.comwrote innews:11**********************@8g2000cwh.googlegr oups.com:


I have a form based on the query:
The form has a filter:
((CG_OKGR_IDN) = 'A. LEUSCHEL BEHEER B.V.')
The filterproperty is set to 'True' but the filter simply does
not work. If I put this filter in de SQL as a WHERE statement
it works...............
I have tried setting the filter through a module in VBA, in
the form itself, in design mode, in normal mode, even manually
but the form just refuses to filter anything.
There is in de code nothing to find that would set the filter
otherwise, in none of the events of the form nor in any events
connected to any of the controls.................
Any suggestions as to why this form refuses to filter?
I tried compacting and repairing the database as well as
importing the whole shebang in a new database but no
resolve.......................... Only remorse.............

Forms also have a property: .FilterOn This must be set True for
the filter to work. You have not mentioned setting this
property. Were you aware of it and what happens if you do set
it?

The .Filter Property should contain an expression which
evaluates the records to include when the filter is on.

--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account fromhttp://www.teranews.com- Tekst uit oorspronkelijk bericht niet weergeven -

- Tekst uit oorspronkelijk bericht weergeven -

Mar 9 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.