Helllo, I have what I think is a simple question.
I have a "customer grid" form (simple summary continuous form that shows a record for every customer in our databse). The list of customers has gotten very long, so I want to put a single filter field int he header of the form.
* Lets call this search/filter field "FilterInput", and say it is unbound.
* Lets say there's a field for each customer called ContactShortName (short name of the client)
I just want an AfterUpdate event that does a LIKE or CONTAINS filter based on what is typed into the search/filter box. For example, if a user types "Micro" into FilterInput, it would filter the list of clients in the form to just clients who's ContactShortName CONTAINS the text "Micro". So "Microsoft Inc" would show, as would "Advanced Micron", etc.
Has to be easy right? I've used variations of the code I inserted below to no avail--get error messages including type mismatch, etc. Can someone help?
Follow-up question: After properly setting the filter, do I do a DoCmd.ApplyFilter to apply it? Or FilterOn = True? Thanks.
Me.Filter = ("frmCustomersGrid") And (Contacts.ContactShortName) Like "*" & Me.FilterInput & "*"
Me.FilterOn = True