Page 1 of 2 12 LastLast
Results 1 to 15 of 16

Thread: Search Engine

  1. #1
    Join Date
    Jul 2013
    Posts
    10

    Unanswered: Search Engine

    I've been using Like "*" & [Enter Client ID ] & "*" within access query via a button to pull records into a form which works beautifully.

    However when you enter a ID like 11 it will pull both the 1 and the 11

    same again with 22 and 2 or 20 .

    How can I get this ( Like "*" & [Enter Client ID ] & "*" ) <- to just search on what i input ?

  2. #2
    Join Date
    Nov 2011
    Posts
    413
    Why not simply use a combo and select your criteria that way?

  3. #3
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    what datatype is the column?
    your code infers its numeric, yet I thought like was only used on text/string columns.
    I'd rather be riding on the Tiger 800 or the Norton

  4. #4
    Join Date
    Jul 2013
    Posts
    10
    The search query currently pulls from two tables into a single tabbed form hold a fair amount of data via one ID a combo box would slow things down and would mean i,d have to rewrite alot of reports and other search methods.

    What I need is a code that works in the query that allows me to search on entering into box , just like what i've got currently however to just search on what i've entered rather than giving me 2 or 3 results,

  5. #5
    Join Date
    Nov 2011
    Posts
    413
    You need to post a screenshot of your qry for this input! You say it pulls from 2 tables and yet uses only Client ID ???

  6. #6
    Join Date
    Jul 2013
    Posts
    10
    It's a one to one relationship database the query is simple , show records that match id , the code is above.

  7. #7
    Join Date
    Nov 2011
    Posts
    413
    You believe you have provided enough details to help! Good Luck with your project!

  8. #8
    Join Date
    Jul 2013
    Posts
    10
    Using ms access 2007, theres client information in table one and client card details in the second table, made a query to include both tables. the key code for the master table is the field I use to determin the client's id and works on a one to one relationship . The code current sits in the ms access query in the critera box so when press open form button I then type in the client id and it pulls one record from master and one from the card details into a form.

  9. #9
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    is the clients id column text or numeric?
    I'd rather be riding on the Tiger 800 or the Norton

  10. #10
    Join Date
    Jul 2013
    Posts
    10
    Yes it's Numeric. Keeps on pull records with the same numbers in it, so u type 2, it. Will pull record number 2 and 22, so currently have to leave the nav buttons on to go from them. I need to be able type in a number and pull that record

  11. #11
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    so you shouldn't use the like term and you definitely should use quote marks
    LIKE is a string match not a numeric match.. thats your problem
    I'd rather be riding on the Tiger 800 or the Norton

  12. #12
    Join Date
    Jul 2013
    Posts
    10
    Ok can u show me what code I should use please

  13. #13
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    to do what?
    = [Enter Client ID ]
    alternatively you could use client names through a combo or list box.
    you could fake a web 2 AJAX style interface but delaying populating the combo box till the 3rd character is filled in then populate the combo box.
    humans are remarkably good at handling names and not so good at handling numbers
    I'd rather be riding on the Tiger 800 or the Norton

  14. #14
    Join Date
    Jul 2013
    Posts
    10
    Ok , I don't want to search by name , I can already do that. It's like u enter ur account number and thrn it gives u ur account details, I don't want to list a bunch of clients to bring up one clients details.

  15. #15
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    so = [Enter Client ID ] should work then
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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