• Queries – Like

    Author
    Topic
    #352251

    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

    Viewing 0 reply threads
    Author
    Replies
    • #511735

      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.

      • #511766

        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.

    Viewing 0 reply threads
    Reply To: Queries – Like

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: