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.
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.
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
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.