Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2007
    Posts
    214

    Question Unanswered: Search - Find any part of a field?

    Hi Everyone,

    Is there any way to modify the code below, so that when I type a value in the search field, it will return results that are not equal, but contain what I typed. Right now the code returns the exact search criteria, but I would like it to just return fields that are a part of what the search criteria is.

    Ex: If I type 114 onto the search it returns the all listings that include 114 on the "office" field.

    If Not IsNull(Me!SearchOffice) Then
    Me.RecordSource = "Select * from [Management List] where [Office] = '" & Forms![Management List]!SearchOffice & "'"
    End If

  2. #2
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Allen Browne has a good tutorial on Search Forms. You'll want to look at the section on 'Partial matches' that deals with using wildcards when searching:

    Microsoft Access tips: Search criteria

    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  3. #3
    Join Date
    Oct 2007
    Posts
    214
    Where would this be inserted? Example? Thanks so much.

  4. #4
    Join Date
    Oct 2007
    Posts
    214
    Any news on where to insert the proper coding for this? Thanks so much!

Posting Permissions

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