Thread: Multi-field Search
04-08-13, 15:13 #1Registered User
- Join Date
- Apr 2013
Unanswered: Multi-field Search
I'm a newbie to Access. So please excuse my ignorance. I have created a database for storing automotive wiring pigtails. I am trying to perform a search on the database using a basic query. I created a simple search form with 3 combo boxes that are tied to simple tables that limit choices for the end user. The query is using 2 tables, "Pigtail" table and a "Service Part Description" table. I am using 2 fields from the "Pigtail" table. The first field is "Cavity" which houses the number of cavities of the pigtail and the other field "Wire Type" houses the type of wire terminal (gold, silver, tin etc). I am using the field "Service Part Description" from the "Service Part Description" table. This is what I am wanting to accomplish. I want the ability to search by any combination of these 3 fields. If any field is left empty, all information in that field will be considered for the search. For example, If I want to perform a search for a 4 cavity pigtail for an Oxygen Sensor, regardless of the wire type, I would choose '4' in the "Cavity" field and choose "Oxygen Sensor " in the "Service Part Description" field. I would leave the "Wire Type" field blank to match all wire types that match the other 2 field criteria. I have tried to use this simple criteria formula (Like "*" & [Forms]![Part Description Search]![Cavity] & "*") in the query box on each of the 3 fields (Changing the field name on each query) that I found on the internet. However it is not working. Any ideas?