Partial Match with Form Filter

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • wecka
    New Member
    • Oct 2006
    • 8

    Partial Match with Form Filter

    Hello All,

    Does any one know how to use the form filter in Access to provide partial match?
    When you choose to "form filter," all text boxes will convert to combo boxes where you can choose from the already stored data in the corresponding tables. But for example I want to match all records containing the word John (assume it is a name field).
    If there is a way to do this, it will save my life from having to write a big chunck of SQL code to achieve the mission especially with many fields on the form being matched against.

    Appreciated.

    - Hany
  • PEB
    Recognized Expert Top Contributor
    • Aug 2006
    • 1418

    #2
    Hi,

    In the respective field type *John*

    And you will see that the expression willchange automatically to :

    Like "*John*"

    :)

    Comment

    • wecka
      New Member
      • Oct 2006
      • 8

      #3
      Thanks PEB,

      That seems a straight forward and good solution, but what do you think will be the best way to present that to the user, especially those of low working knowledge?

      Shall I create a little macro that will change the field value (adding the two astrics) before going the search?

      I also think of a simpler way in adding a note or a help tip about the search.

      Anyways, I am just brainstorming with you if you have something to share. Thanks :)

      - Hany

      Originally posted by PEB
      Hi,

      In the respective field type *John*

      And you will see that the expression willchange automatically to :

      Like "*John*"

      :)

      Comment

      • PEB
        Recognized Expert Top Contributor
        • Aug 2006
        • 1418

        #4
        Hi

        :)

        In fact in my work i'm working just with this kind of autofilters and my users just use expressions like "*BEN*" when they search on a part of the field and when they search for full matching they omit the asterix...

        Maybe it's better to write a help on how to use the asteriks...

        At least I've done it...

        The wilcards give a lot of potential to ssek the datbase without problems... And resolve a lot of problems for developping...

        In fact I've never tried to change a value in a form filter... So I don't know if it's possible...

        Hey people... Good question for a thread???? Is it possible? Changes a value in a form filter?

        In queries, Forms, Tables... Yeah but formfilter??? In fact Yeah...Coz it goes stright to the filter property and you need to retreate the filter property of your form or query...

        So it's possible with a lot of programming... But more knowledge for your users it should more easier to you! :)

        Comment

        • wecka
          New Member
          • Oct 2006
          • 8

          #5
          Thanks PEB. Appreciate your prompt responses.

          I agree that the help note will be good :)

          - Hany

          Comment

          Working...