+ Reply to Thread
Results 1 to 3 of 3

Use of LIKE operator in a query asking for an input

  1. #1
    Registered User
    Join Date
    09-21-2010
    Location
    Rome, Italy
    MS-Off Ver
    Excel 2003
    Posts
    36

    Use of LIKE operator in a query asking for an input

    I'm new to Access and I'm working with queries.
    What I'm trying to do is a query which asks for a criteria when run (i.e. using "[]") for a field type "string": using the "LIKE" operator, it would be possible to input only the first "n" characters, obtaining all the records in which the searched field starts with those "n" characters.

    To be clearer: searching a field CustomerID, containing "Romoluzzi" and "Romoli", I want that my query asks me "Customer?" and after my input of "Romo", I get both the records with Romoluzzi and Romoli.
    The query is unique, the criteria LIKE must be in the "[]", because it can be different at every run ("Romo" is not fixed).

    I thank in advance everyone helping me.
    Last edited by Romoluzzi; 01-08-2011 at 08:49 AM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,929

    Re: Use of LIKE operator in a query asking for an input

    In your criteria type:

    Like [Enter the first couple of letters of your parameter here] & "*"
    Good Luck
    Alan
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    09-21-2010
    Location
    Rome, Italy
    MS-Off Ver
    Excel 2003
    Posts
    36

    Re: Use of LIKE operator in a query asking for an input

    Thank you so much for your prompt and useful help!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1