immediate filtering

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Michiel Rapati-Kekkonen

    immediate filtering

    Hi,

    I would like that my subform is immediately filtered as soon as one types a
    letter in an unbound searchbox in the form.
    If one types an 's' the content of the subform shows only records starting
    with s
    If one continues with 'e' the subform would show the ones starting with se.
    If one would correct that to 'e' by going back and removing the 's' the
    records would start with an e.

    Any suggestions?

    Thanks in advance

    Michiel

  • Tom van Stiphout

    #2
    Re: immediate filtering

    On Thu, 24 Apr 2008 20:20:11 GMT, "Michiel Rapati-Kekkonen"
    <nn@nonsense.zz wrote:

    Write your code in the <control>_Chang e event.
    -Tom.

    >Hi,
    >
    >I would like that my subform is immediately filtered as soon as one types a
    >letter in an unbound searchbox in the form.
    >If one types an 's' the content of the subform shows only records starting
    >with s
    >If one continues with 'e' the subform would show the ones starting with se.
    >If one would correct that to 'e' by going back and removing the 's' the
    >records would start with an e.
    >
    >Any suggestions?
    >
    >Thanks in advance
    >
    >Michiel

    Comment

    • Michiel Rapati-Kekkonen

      #3
      Re: immediate filtering

      great
      and thank you
      (Dank je)

      Michiel


      "Tom van Stiphout" <no.spam.tom774 4@cox.netwrote in message
      news:ran214pp3p gb8of9uj9bkcaj1 al4a44qjr@4ax.c om...
      On Thu, 24 Apr 2008 20:20:11 GMT, "Michiel Rapati-Kekkonen"
      <nn@nonsense.zz wrote:
      >
      Write your code in the <control>_Chang e event.
      -Tom.
      >
      >
      >>Hi,
      >>
      >>I would like that my subform is immediately filtered as soon as one types
      >>a
      >>letter in an unbound searchbox in the form.
      >>If one types an 's' the content of the subform shows only records starting
      >>with s
      >>If one continues with 'e' the subform would show the ones starting with
      >>se.
      >>If one would correct that to 'e' by going back and removing the 's' the
      >>records would start with an e.
      >>
      >>Any suggestions?
      >>
      >>Thanks in advance
      >>
      >>Michiel
      >

      Comment

      • Michiel Rapati-Kekkonen

        #4
        Re: immediate filtering

        butbut, how do I know what is in the box?
        at the moment of the Change event the content of the control is not yet
        recognized.
        Or I donot know how to get it from it...

        Michiel



        "Tom van Stiphout" <no.spam.tom774 4@cox.netwrote in message
        news:ran214pp3p gb8of9uj9bkcaj1 al4a44qjr@4ax.c om...
        On Thu, 24 Apr 2008 20:20:11 GMT, "Michiel Rapati-Kekkonen"
        <nn@nonsense.zz wrote:
        >
        Write your code in the <control>_Chang e event.
        -Tom.
        >
        >
        >>Hi,
        >>
        >>I would like that my subform is immediately filtered as soon as one types
        >>a
        >>letter in an unbound searchbox in the form.
        >>If one types an 's' the content of the subform shows only records starting
        >>with s
        >>If one continues with 'e' the subform would show the ones starting with
        >>se.
        >>If one would correct that to 'e' by going back and removing the 's' the
        >>records would start with an e.
        >>
        >>Any suggestions?
        >>
        >>Thanks in advance
        >>
        >>Michiel
        >

        Comment

        • Larry Linson

          #5
          Re: immediate filtering


          "Michiel Rapati-Kekkonen" <nn@nonsense.zz wrote in message
          news:%X5Qj.234$ eZ6.23@read4.in et.fi...
          Hi,
          >
          I would like that my subform is immediately filtered as soon as one types
          a letter in an unbound searchbox in the form.
          If one types an 's' the content of the subform shows only records starting
          with s
          If one continues with 'e' the subform would show the ones starting with
          se.
          If one would correct that to 'e' by going back and removing the 's' the
          records would start with an e.
          >
          Any suggestions?
          >
          Thanks in advance
          What you describe is the way that Combo Boxes work with their AutoExpand
          property set to Yes (the default setting). If you would clarify what you
          are attempting to accomplish, rather than how you intended to accomplish it,
          perhaps someone could make a useful suggestion. Perhaps you might even use
          a Combo Box, instead of a continuous forms view Form embedded in a Subform,
          to perform the function you want.

          Tom is correct... I am certain you can, with expenditure of time and effort,
          re-implement the AutoExpand functionality for your Subform (the examples of
          which I have read did so for a List Box, though I cannot imagine why they
          did not use a Combo Box instead).

          If you cannot get at the current content, what VBA code are you using? The
          complete contents of that text box should be available in the OnChange event
          should be available as its Text property -- determining whether an
          additional letter has been added, or a backspace deleted one, or the
          contents cleared are what will make this more of a challenge than just using
          a ComboBox, which has the added benefit of preventing you from going afar
          off typing several letters of a non-existent term.

          Larry Linson
          Microsoft Office Access MVP

          Larry Linson
          Microsoft Office Access MVP


          Comment

          • Wayne Gillespie

            #6
            Re: immediate filtering


            On Sun, 27 Apr 2008 09:23:48 GMT, "Michiel Rapati-Kekkonen" <nn@nonsense.zz >
            wrote:
            >butbut, how do I know what is in the box?
            >at the moment of the Change event the content of the control is not yet
            >recognized.
            >Or I donot know how to get it from it...
            >
            >Michiel
            >
            >
            Read the "Text" property of the control. It returns the current displayed
            content of the control not the stored value.

            strSearch = Me.MyCombo.Text


            Wayne Gillespie
            Gosford NSW Australia

            Comment

            • Michiel Rapati-Kekkonen

              #7
              Re: immediate filtering

              Thank you
              indeed I never used that property before!
              Good to know, very good to know.

              Michiel



              "Wayne Gillespie" <bestfit@NOhotm ailSPAM.com.auw rote in message
              news:rnaa14dakm gquaqiipr0rjpsv h5n0bvdp7@4ax.c om...
              >
              On Sun, 27 Apr 2008 09:23:48 GMT, "Michiel Rapati-Kekkonen"
              <nn@nonsense.zz >
              wrote:
              >
              >>butbut, how do I know what is in the box?
              >>at the moment of the Change event the content of the control is not yet
              >>recognized.
              >>Or I donot know how to get it from it...
              >>
              >>Michiel
              >>
              >>
              >
              Read the "Text" property of the control. It returns the current displayed
              content of the control not the stored value.
              >
              strSearch = Me.MyCombo.Text
              >
              >
              Wayne Gillespie
              Gosford NSW Australia

              Comment

              • Michiel Rapati-Kekkonen

                #8
                Re: immediate filtering

                Thanks for your extensive response,
                but it was the Text property, I did not know about.
                Now I know, and now it works the way I want it.

                Thank you

                Michiel


                "Larry Linson" <bouncer@localh ost.notwrote in message
                news:IE3Rj.2321 $Rk6.2285@trndd c07...
                >
                "Michiel Rapati-Kekkonen" <nn@nonsense.zz wrote in message
                news:%X5Qj.234$ eZ6.23@read4.in et.fi...
                >Hi,
                >>
                >I would like that my subform is immediately filtered as soon as one types
                >a letter in an unbound searchbox in the form.
                >If one types an 's' the content of the subform shows only records
                >starting with s
                >If one continues with 'e' the subform would show the ones starting with
                >se.
                >If one would correct that to 'e' by going back and removing the 's' the
                >records would start with an e.
                >>
                >Any suggestions?
                >>
                >Thanks in advance
                >
                What you describe is the way that Combo Boxes work with their AutoExpand
                property set to Yes (the default setting). If you would clarify what you
                are attempting to accomplish, rather than how you intended to accomplish
                it, perhaps someone could make a useful suggestion. Perhaps you might
                even use a Combo Box, instead of a continuous forms view Form embedded in
                a Subform, to perform the function you want.
                >
                Tom is correct... I am certain you can, with expenditure of time and
                effort, re-implement the AutoExpand functionality for your Subform (the
                examples of which I have read did so for a List Box, though I cannot
                imagine why they did not use a Combo Box instead).
                >
                If you cannot get at the current content, what VBA code are you using?
                The complete contents of that text box should be available in the OnChange
                event should be available as its Text property -- determining whether an
                additional letter has been added, or a backspace deleted one, or the
                contents cleared are what will make this more of a challenge than just
                using a ComboBox, which has the added benefit of preventing you from going
                afar off typing several letters of a non-existent term.
                >
                Larry Linson
                Microsoft Office Access MVP
                >
                Larry Linson
                Microsoft Office Access MVP
                >
                >

                Comment

                • Larry Linson

                  #9
                  Re: immediate filtering


                  "Michiel Rapati-Kekkonen" <nn@nonsense.zz wrote
                  Thanks for your extensive response,
                  but it was the Text property, I did not know about.
                  Now I know, and now it works the way I want it.
                  Content is available in the .Text property or the .Value property (the
                  latter is the default property of a Control). It can be an interesting read
                  to learn the differences, but in the long run, may just be easier to try
                  ..Value (or nothing, using the default to .Value) and then try .Text when
                  that doesn't do what you want.

                  Larry Linson
                  Microsoft Office Access MVP


                  Comment

                  Working...