Okay, so I have 2 tables - Contacts, Category. In the contacts table there is lookup value to the category table. I have a query called Search_Contacts below is the SQL code:
Code:
SELECT Contacts.ID, Contacts.Title, Contacts.FirstName, Contacts.LastName, Contacts.JobTitle, Contacts.Company, Contacts.AddressLine1, Contacts.AddressLine2, Contacts.Town, Contacts.County, Contacts.PostalCode, Contacts.Phone, Contacts.Fax, Contacts.Email, Contacts.Website, Contacts.Category, Contacts.Include, Contacts.Notes, Contacts.Newsletter, Contacts.AGMFROM Contacts
WHERE (((Contacts.FirstName) Like "*" & [forms]![Filter_Contacts]![s_FirstName] & "*") AND ((Contacts.LastName) Like "*" & [forms]![Filter_Contacts]![s_LastName] & "*") AND ((Contacts.Company) Like "*" & [forms]![Filter_Contacts]![s_Company] & "*") AND ((Contacts.County) Like "*" & [forms]![Filter_Contacts]![s_County] & "*") AND ((Contacts.PostalCode) Like "*" & [forms]![Filter_Contacts]![s_PostalCode] & "*") AND ((Contacts.Category) Like "*" & [forms]![Filter_Contacts]![CategoryList] & "*"));
If not all data fields in the table is not filled in then the query doesn't return results please help