How to search database and only search for parts of cells?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • VBnewb13
    New Member
    • Jun 2010
    • 17

    How to search database and only search for parts of cells?

    Hello,

    I made a form with a text box, button, and subform (which displays data from a query). When I type data into the text box and hit the button, it returns the entire row from the query datasheet in the subform.

    What I would like to do is this: The first column of the query table, for example, contains numbers
    (i.e. 8452 6484) in that format. #### ####. Since these numbers are in one cell, I would like to be able to type the first 4 numbers and have it show the entire in the results.

    I appreciate any help or advice.

    Thanks
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32645

    #2
    Check out Example Filtering on a Form. Your filter would probably need to use the Like comparator, and you should understand that you are not dealing with numbers here, but strings - The literal values will be surrounded by single-quotes (').

    Comment

    Working...