Results 1 to 15 of 15
  1. #1
    ortizimo is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jun 2017
    Location
    FL
    Posts
    88

    Search Filter Coming up with Similar Words but need Exact Results

    This DB is for my video game collection.



    Here's my issue. I made a search box and button in my MAIN FORM and the button holds the macro APPLYFILTER.

    In it, I have the following string: [ConsoleName] Like '*' & [Forms]![frmMain]![Search_Box] & '*'.

    I then type NES and GENESIS and SNES also show up along with NES results.

    I do not want to have multiple queries for each console and would like to run all my queries from a single one. How should I do this to make the search specific to each console without having multiple queries for each console? Thanks.

  2. #2
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2010 64bit
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051
    Like *.....* returns everything containing the string "nes".

    Why not use a combobox with the console names in there.

  3. #3
    ortizimo is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jun 2017
    Location
    FL
    Posts
    88
    Quote Originally Posted by andy49 View Post
    Like *.....* returns everything containing the string "nes".

    Why not use a combobox with the console names in there.
    I'm trying to stay away from comboboxes because I dont want to have every single console that has ever existed in a form and all the queries for each even though it looks that the route I'm going to have to take then update accordingly. I'm making this DB for myself but also I would like to have it ready for others that may have a different collection. I just dont want to have to custom make every DB for each person. Having all within one query would help me maintain the DB easier.

  4. #4
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    How many different consoles are you dealing with?

  5. #5
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2010 64bit
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051
    Surely a cbo could be programmed to only list the consoles on your database. If a new console is made, is will automatically be in the combo

  6. #6
    ortizimo is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jun 2017
    Location
    FL
    Posts
    88
    Quote Originally Posted by orange View Post
    How many different consoles are you dealing with?
    at this time I have 7 different consoles (vintage) with 500 games in all. some people in the the group I belong to have more and different ones...

  7. #7
    ortizimo is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jun 2017
    Location
    FL
    Posts
    88
    Quote Originally Posted by andy49 View Post
    Surely a cbo could be programmed to only list the consoles on your database. If a new console is made, is will automatically be in the combo
    ive never used combobox but I tried it yesterday and when I do a form all i get is numbers instead of the names of each which I put in there to begin with. plz clarify. thnx.

  8. #8
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    Please describe to us what you plan to do with this proposed database.
    You have 7 consoles and 500 games. How do these relate?
    What info do you plan on storing, querying...?

  9. #9
    ortizimo is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jun 2017
    Location
    FL
    Posts
    88
    Quote Originally Posted by orange View Post
    Please describe to us what you plan to do with this proposed database.
    You have 7 consoles and 500 games. How do these relate?
    What info do you plan on storing, querying...?
    all im quering are consoles and games for the moment...i have a single form with all games and how they relate to the console and their condition and any extra like manuals, etc...none of that is important right now. All i want is to query NES and only NES without showing SNES or GENESIS because both words have NES in them. That is the string I used at the beginning of the post under a button using OnClick Event.

  10. #10
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2010 64bit
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051
    I'd like to know if you have a table just for consoles?

  11. #11
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    So, in plain English, you have a number of Games, some Manuals in various condition, and a number of consoles. You haven't said, but I'll assume and you can correct/adjust as necessary, that some games are only available on certain consoles; you have a list of "conditions" that can be assigned to manuals.

    The idea is to identify what is in scope -that is what will your database be about. It's a lot like the artists concept of a new shopping center. This is what it could look like, but then you have city bylaws, feedback from various groups and then you rearrange the details, identify priorities to get to a plan that you can act on. You don't wait until the parking lot has been paved and painted to design the entrance.

    Get everything that the database will be about into your conceptual model. Identify priorities --somethings can be left as "black boxes", but you'll know what they are for and where they fit within the big picture. Some things may remain "black boxes" if conditions change.

    Good luck.

  12. #12
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Sounds like you need cascading (dependent) comboboxes. Common topic. Search web or forum.
    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.

  13. #13
    ortizimo is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jun 2017
    Location
    FL
    Posts
    88
    Quote Originally Posted by andy49 View Post
    I'd like to know if you have a table just for consoles?
    yes theres a game table, a console table...all other data for the time being are inside the game table like condition, manual, case, etc...i can move them to their own table later.

  14. #14
    ortizimo is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jun 2017
    Location
    FL
    Posts
    88
    Quote Originally Posted by ortizimo View Post
    yes theres a game table, a console table...all other data for the time being are inside the game table like condition, manual, case, etc...i can move them to their own table later.
    well, if I can [ConsoleName] Like "NES" why cant I [ConsoleName] = "NES" or something to just ID NES from geNESis or SNES? This should be in the cmdSearch button...thats my main question...thnx.

  15. #15
    ortizimo is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jun 2017
    Location
    FL
    Posts
    88
    Ok I finally figured it out after a week of barely sleeping over this...

    ="[ConsoleName] = " & "'" & [Screen].[ActiveControl] & [Forms]![tblMain]![txtSearch] & "'"

    This will let me ACTUALLY search NES without pulling GENESIS or SNES because each of those 2 words have NES in their name.

    This can be closed now...Thanks to everyone that tried to help me.

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

Similar Threads

  1. Replies: 10
    Last Post: 07-07-2017, 05:11 PM
  2. Replies: 2
    Last Post: 12-26-2016, 04:27 PM
  3. Replies: 3
    Last Post: 03-21-2014, 09:34 AM
  4. Replies: 3
    Last Post: 09-12-2013, 02:18 PM
  5. Query for similar but not exact data
    By markdudley in forum Queries
    Replies: 4
    Last Post: 03-09-2012, 01:02 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