Results 1 to 4 of 4
  1. #1
    ck4794 is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Oct 2013
    Posts
    80

    filter don't work?

    Private Sub txtsearch_afterupdate()


    Me.Form.Filter = [Forms]![frmsearchrofile:active]![Last] Like [Forms]![frmsearchrofile:active]![txtSearch] & "*"
    Me.FilterOn = True
    End Sub

    i've tried a million combinations of the above. at least it doesn't bring back an error. but it does do this. i type in "A" as i'm looking at the list of
    A
    B
    A
    Nothing happens
    I type in "B"
    and the filter yields no results.

    Any Advice?

  2. #2
    ck4794 is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Oct 2013
    Posts
    80
    s.o.b. i found the thread to answer my question after i posted this. just in case someone comes across this post instead of that one first, here was the correct answer:
    Me.Filter = "Last LIKE '*" & Me.txtSearch & "*'"
    Me.FilterOn = True

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    Try

    Me.Form.Filter = "[Last] Like '" & [Forms]![frmsearchrofile:active]![txtSearch] & "*'"
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    Oops, looks like I type too slowly. By the way, the colons are not recommended. See symbols at the bottom:

    http://support.microsoft.com/default...b;EN-US;209187
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. In Access Form How Does Filter Work
    By EddieN1 in forum SQL Server
    Replies: 3
    Last Post: 09-05-2013, 03:10 PM
  2. Replies: 1
    Last Post: 08-16-2012, 01:51 PM
  3. Replies: 2
    Last Post: 11-12-2011, 08:37 AM
  4. Replies: 4
    Last Post: 07-14-2011, 09:49 AM
  5. Filter on subform doesn't work
    By Edwardo in forum Programming
    Replies: 6
    Last Post: 11-29-2010, 08:57 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