Results 1 to 3 of 3

Thread: Queries - Like

  1. #1
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Morecambe England, Lancashire, England
    Posts
    105
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Queries - Like

    This is the first time I've tried to post anything so if not doing it the right way please tell me!!

    I see there has bee a lot of chat on finding things in a query by using "LIKE" and also the there was a good note in WAW by Susan Harkins this week.

    I did in fact send her the next bit which may help others in the lounge

    ------------------------
    Hi,

    Very interesting article on "Like" in Queries. I had not realised that half of the options that she listed could be used.

    However I felt that Susan left out one of the most important variations and one that I use all the time for people who have no idea what a query is!

    Lets assume we are trying to list all the Boiled sweets we stock

    the format is;-

    Like [Enter the name of the Product you want to find]

    The Query is then linked to a report so all the person has to do is run the report and when the Box comes up enter the string they want to find and the report comes back with all the matches.

    You can put the wild card * symbol in as well, before you enter the string or at the end, or both to find what you want in the middle of the string.

    I often do that for them by changing the query to:-

    Like "*" & [Enter the name of the Product you want to find] & "*"

    When the report is run and you type in led swe it will find boiled sweets, Red Boiled sweets, Green Boiled sweets with a sticky centre, and any other you can think of!
    ------------------------------------------------

    Thanks for a good forum
    but if post this reply incorectly do please jump in and tell.



    Michael Peak
    Morecambe England

  2. #2
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Edmonton, Alberta, Canada
    Posts
    326
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Queries - Like

    Yes, it is very useful, but not specific to Like (probably why Susan didn't mention it). As an example, you can enter something like BETWEEN [Enter from] AND [Enter to] to let the user specify a range, >=[Enter Minimum Value] to let them specify a minimum, etc.

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Queries - Like

    The expression in brackets is interpreted as a parameter because it doesn't match any of the field names in the tables within the query. You can use parameters like that in most parts of a query, including in a calculated field. The only thing to watch out for is crosstab queries, which tend to choke on parameters.
    Charlotte

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •