Filter in form not working?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Henrootje

    #1

    Filter in form not working?

    I have a form based on the query:

    SELECT tblCreditGeld.C G_Selected, tblCreditGeld.C G_ClientSelecte d,
    tblCreditGeld.C G_ComplexSelect ed, tblCreditGeld.C G_OKGR_ID,
    tblCreditGeld.C G_OKGR_IDN, tblCreditGeld.C G_client_n,
    tblCreditGeld.C G_COMP_NR, tblCreditGeld.C G_BANKREK_NR,
    tblCreditGeld.C G_clientnm, tblCreditGeld.C G_K_MUNT_ISO,
    tblCreditGeld.C G_GRV, tblCreditGeld.C G_kcons, tblCreditGeld.C G_unit,
    tblCreditGeld.C G_Kode, tblCreditGeld.C G_Perc1,
    tblCreditGeld.C G_MPerc1, tblCreditGeld.C G_Grens,
    tblCreditGeld.C G_Perc2, tblCreditGeld.C G_MPerc2,
    tblCreditGeld.C G_BGrens, tblCreditGeld.C G_CREDITRENTE_4 ,
    tblCreditGeld.C G_EFF_PERC_CR_4 , tblCreditGeld.C G_verrt,
    tblCreditGeld.C G_CREDITRENTE_T OT, tblCreditGeld.C G_EFF_PERC_CR_T OT,
    tblCreditGeld.C G_vertot, tblCreditGeld.C G_CREDITRENTE_4 _C,
    tblCreditGeld.C G_EFF_PERC_CR_4 _C, tblCreditGeld.C G_CREDITRENTE_T OT_C,
    tblCreditGeld.C G_EFF_PERC_CR_T OT_C, tblCreditGeld.C G_NAAM,
    tblCreditGeld.C G_kadv, tblCreditGeld.C G_mar, tblCreditGeld.C G_martot,
    tblCreditGeld.C G_kmar, tblCreditGeld.C G_kmartot,
    tblCreditGeld.C G_5TON, tblCreditGeld.C G_PORTO,
    tblCreditGeld.C G_Freq_Dagafsch r
    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

  • Tom van Stiphout

    #2
    Re: Filter in form not working?

    On 7 Mar 2007 23:48:25 -0800, "Henrootje" <HenroV@gmail.c omwrote:

    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!<yourfor m>.Filter
    and see what it produced.

    -Tom.

    >I have a form based on the query:
    >
    >SELECT tblCreditGeld.C G_Selected, tblCreditGeld.C G_ClientSelecte d,
    >tblCreditGeld. CG_ComplexSelec ted, tblCreditGeld.C G_OKGR_ID,
    >tblCreditGeld. CG_OKGR_IDN, tblCreditGeld.C G_client_n,
    >tblCreditGeld. CG_COMP_NR, tblCreditGeld.C G_BANKREK_NR,
    >tblCreditGeld. CG_clientnm, tblCreditGeld.C G_K_MUNT_ISO,
    >tblCreditGeld. CG_GRV, tblCreditGeld.C G_kcons, tblCreditGeld.C G_unit,
    >tblCreditGeld. CG_Kode, tblCreditGeld.C G_Perc1,
    >tblCreditGeld. CG_MPerc1, tblCreditGeld.C G_Grens,
    >tblCreditGeld. CG_Perc2, tblCreditGeld.C G_MPerc2,
    >tblCreditGeld. CG_BGrens, tblCreditGeld.C G_CREDITRENTE_4 ,
    >tblCreditGeld. CG_EFF_PERC_CR_ 4, tblCreditGeld.C G_verrt,
    >tblCreditGeld. CG_CREDITRENTE_ TOT, tblCreditGeld.C G_EFF_PERC_CR_T OT,
    >tblCreditGeld. CG_vertot, tblCreditGeld.C G_CREDITRENTE_4 _C,
    >tblCreditGeld. CG_EFF_PERC_CR_ 4_C, tblCreditGeld.C G_CREDITRENTE_T OT_C,
    >tblCreditGeld. CG_EFF_PERC_CR_ TOT_C, tblCreditGeld.C G_NAAM,
    >tblCreditGeld. CG_kadv, tblCreditGeld.C G_mar, tblCreditGeld.C G_martot,
    >tblCreditGeld. CG_kmar, tblCreditGeld.C G_kmartot,
    >tblCreditGeld. CG_5TON, tblCreditGeld.C G_PORTO,
    >tblCreditGeld. CG_Freq_Dagafsc hr
    >FROM tblCreditGeld;
    >
    >The form has a filter:
    >((CG_OKGR_ID N) = '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

    Comment

    • Bob Quintal

      #3
      Re: Filter in form not working?

      "Henrootje" <HenroV@gmail.c omwrote in
      news:1173340105 .208815.273950@ 8g2000cwh.googl egroups.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

      Comment

      • Henrootje

        #4
        Re: Filter in form not working?

        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...@sPAmp atico.cawrote:
        "Henrootje" <Hen...@gmail.c omwrote innews:11733401 05.208815.27395 0@8g2000cwh.goo glegroups.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.co m- Tekst uit oorspronkelijk bericht niet weergeven -
        >
        - Tekst uit oorspronkelijk bericht weergeven -

        Comment

        Working...