Results 1 to 4 of 4

Thread: Like statement

  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Like statement

    I have a query which uses the Like 1*** statement in the criteria to find a particular ID #.. Is there a way to make this have an input box so the user can enter in whatever digits (the last 3) that thet want? Can the [Enter] statement be used some how? Thanks..

    Added

  2. #2
    New Lounger
    Join Date
    Jan 2001
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Like statement

    Is this a parameter query that you are wanting to use to find a particular record? If so, you can use the Like feature with a "*" and a "&". For example, you would enter into the Criteria box the following: Like "*" & [Enter the last three digits of the ID]. You don't need the 1***.

    Since Access is smart, all you need to type is: Like *&[Enter the last three digits of the ID]. Access will add the quotes when you leave the box.

    The "*" is a wildcard. The "&" concatonates the wildcard to the three digits.

    Is this close?

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

    Re: Like statement

    If you want to use 3 separate wildcards in the like expression (for whatever reason), use question marks. They represent single character wildcards. However, the previous suggestion is simpler and more practical.
    Charlotte

  4. #4
    3 Star Lounger
    Join Date
    Jan 2001
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Like statement

    Thanks that worked..

Posting Permissions

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