Results 1 to 6 of 6
  1. #1
    RichardAnderson is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2013
    Posts
    74

    How Can I: Make Query Not Have To Match Exactly

    Hello Guys....

    I have a query that has the following criteria for one of the fields...
    [Enter A Customer] (Must match exactly)]

    This works perfect for listing all records for a customer. My problem in with a similar query. We manufacture light fixtures. The database is question is a production schedule. There is a field for the "Build". Every build is typically different, however, some are just variations of the same product.

    There is a field named ITEM. In this field are the builds. They can look like this....
    VIS816-AS-DE26Q-41
    4810-WH-232-41-EM
    SFL-BR-150H
    VIS714-BN-DE18Q-41



    Notice the 1st and 4th items I listed both start with VIS. This is the code for the VISION light fixture. the 816 and 714 after VIS is the size of it. The rest of the code is color-lamping-kelvin.

    What I need is to have a query work just like the one for customers, but not have to match exactly. In other words, when the button to run the query is clicked and the dialogue pops up, it would be nice to only have to type in "vis". And after typing in VIS and clicking OK, both the 1st and 4th records would be displayed.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    Use LIKE operator with wildcard.

    Here is one method: http://www.datapigtechnologies.com/f...tomfilter.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    RichardAnderson is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2013
    Posts
    74
    Thank You... This worked...

  4. #4
    RichardAnderson is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2013
    Posts
    74
    I can across a problem here.

    I have a couple items in my testing DB...

    SR11-AS-DE26Q
    D1010-AS-SE13Q

    SR11 and D1010 are the main model numbers.
    AS is a color code and...
    DE26Q and SE26Q are lamping codes.

    When I click the button and type in SR, SR11, or D1010 then it works perfect and displays only that record. However, if you types in "AS" then the resulting form is blank.

    Here is my query criteria...
    Code:
    Like [Enter a Model] & "*"
    If anyone knows a way to alter this code please share.

    If only you could make the find and replace feature work like a filter.

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    You can have wildcard on both sides:

    Like "*" & [Enter a model] & "*"
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #6
    RichardAnderson is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2013
    Posts
    74
    Thank you so much....

    This worked.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Match/Unmatch Query need
    By kwooten in forum Queries
    Replies: 5
    Last Post: 11-08-2012, 01:26 PM
  2. Replies: 16
    Last Post: 03-13-2012, 03:47 PM
  3. Non match query
    By BorisGomel in forum Access
    Replies: 2
    Last Post: 07-13-2011, 12:00 PM
  4. Query to match job and client skills?
    By kbp in forum Access
    Replies: 5
    Last Post: 01-27-2011, 05:15 AM
  5. Query to match ID's
    By Shag84 in forum Access
    Replies: 2
    Last Post: 09-06-2009, 08:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums