Results 1 to 4 of 4
  1. #1
    StuM is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2019
    Posts
    2

    Exclamation Create Search / Filter Button on Access Contact Database

    in my microsoft access 2016 form i want to create GoTo buttons (A,B,C,D,E etc) to search and filter for example all persons with surname beginning with letter M.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    8,834
    When the user types a letter (or name) in a text box,txtFind, filter the list of all records:

    Code:
    sub txtFind_afterupdate()
      Me.filter= "*" & txtFind & "*"
      me.filterOn = true
    end sub

  3. #3
    StuM is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2019
    Posts
    2

    Question

    Quote Originally Posted by StuM View Post
    in my microsoft access 2016 form i want to create GoTo buttons (A,B,C,D,E etc) to search and filter for example all persons with surname beginning with letter M.

    "Sorry but thisrply means very little to me!!

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    21,712
    If you want to use buttons, behind each button use ranman's code but with a hard -coded value. Behind the A button:

    Me.filter= "FieldName Like 'A*'"
    me.filterOn = true

    Replacing "FieldName" with the name of the field you want the filter applied to.
    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. Replies: 1
    Last Post: 06-28-2018, 10:08 AM
  2. Replies: 1
    Last Post: 11-29-2017, 12:23 PM
  3. Replies: 1
    Last Post: 11-20-2012, 01:29 PM
  4. Replies: 5
    Last Post: 07-13-2012, 01:15 AM
  5. Replies: 4
    Last Post: 08-05-2011, 07:27 AM

Tags for this Thread

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 - Senior Forums