Access Filter one CoboBox based on text in multiple text boxes

Murray Brown
Murray Brown used Ask the Experts™
on
Hi I posed the following question about filtering an Access ComboBox
https://www.experts-exchange.com/questions/29165295/Access-VBA-Filter-ComboBox.html#a42985396

I now have a similar scenario where I have three text boxes for Name, Surname and Company Name
I want the user to type anything into one or more of these text boxes and then filter a single ComboBox
called cmbLicensee
How would I do this?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
President / Owner CARDA Consultants Inc.
Distinguished Expert 2018
Commented:
I guess you could concatenate a series of filters together, something like

Like "*" & [forms]![YourFormName]![Name].[Text] & "*" & [forms]![YourFormName]![Surname].[Text] & "*" & [forms]![YourFormName]![Company Name].[Text] & "*"

Open in new window


Also note, you should never assign anything the name 'name' as it is a reserved word which can result is bugs and other problems, and you should also avoid the use of special characters including spaces so I would use CompanyName instead of Company Name.
Murray BrownASP.net/VBA/VSTO Developer

Author

Commented:
Thanks very much

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial