"like" in a query

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

    "like" in a query

    hi all !

    i want to use the "like" function in a query but i want the user to
    enter the search variable.
    i have tried "like[enter name to search]" but this doesnt return any
    results for some reason.
    any ideas ???

    thanks
    brino

  • Teessider

    #2
    Re: "like&quot ; in a query


    brino wrote:
    hi all !
    >
    i want to use the "like" function in a query but i want the user to
    enter the search variable.
    i have tried "like[enter name to search]" but this doesnt return any
    results for some reason.
    any ideas ???
    >
    thanks
    brino
    Try Like "*" & [enter name to search] & "*"

    This will search for the entered string anywhere in the field...
    eg: User enters: jac
    Query will return:
    Jack
    Jacqueline
    Jackie
    Jacob
    Ian Jackson
    etc.

    Similarly you could use:

    Like [enter name to search] & "*"
    ....to search for names beginning with whatever the user enters
    eg: User enters: da
    Query will return:
    Dave
    David
    Davina
    etc.

    Hope this helps! :-)

    Comment

    • Arno R

      #3
      Re: "like&quot ; in a query

      like [enter name to search]
      without the quotes!

      Arno R


      "brino" <bdsolutions200 2@yahoo.com.aus chreef in bericht news:1159265812 .940836.31020@b 28g2000cwb.goog legroups.com...
      hi all !

      i want to use the "like" function in a query but i want the user to
      enter the search variable.
      i have tried "like[enter name to search]" but this doesnt return any
      results for some reason.
      any ideas ???

      thanks
      brino
      >

      Comment

      • Teessider

        #4
        Re: &quot;like&quot ; in a query

        That also works providing your users know how to use wildcards, as they
        can then enter the * themselves.

        Using that method, typing in just: Jac
        Would only return people called Jac and not Jack, Jacqueline, Jackie
        etc

        However, if the user type: jac* or *jac*
        It would work in the same way as my examples above.

        Just depends on the ability of your users!

        Arno R wrote:
        like [enter name to search]
        without the quotes!
        >
        Arno R
        >
        >
        "brino" <bdsolutions200 2@yahoo.com.aus chreef in bericht news:1159265812 .940836.31020@b 28g2000cwb.goog legroups.com...
        hi all !

        i want to use the "like" function in a query but i want the user to
        enter the search variable.
        i have tried "like[enter name to search]" but this doesnt return any
        results for some reason.
        any ideas ???

        thanks
        brino

        Comment

        • Wild Bill

          #5
          Re: &quot;like&quot ; in a query

          Hi Paul:

          That was a good answer. Clear and easy to understand.
          For some reason, I am not getting feed back from my questions on the
          forum.

          Are there some kind of initialtion rights?

          I am having trouble with a query that has multiple criteria using the
          Like form.
          Should this go under a separate topic?

          Thanks in advance:
          Bill

          Comment

          • Teessider

            #6
            Re: &quot;like&quot ; in a query

            Hiya Bill,
            Yeah, I'd advise you start a new topic, and ensure you give plenty of
            info regarding your problem.
            If someone CAN answer it, they usually do.
            Regards
            Paul

            Wild Bill wrote:
            Hi Paul:
            >
            That was a good answer. Clear and easy to understand.
            For some reason, I am not getting feed back from my questions on the
            forum.
            >
            Are there some kind of initialtion rights?
            >
            I am having trouble with a query that has multiple criteria using the
            Like form.
            Should this go under a separate topic?
            >
            Thanks in advance:
            Bill

            Comment

            Working...