I have a search form that works great, but only if every field is populated. Basically, I can search for one or all of the parameters and it will retrieve records that meet those parameters. It will not, however retrieve a record if any of those fields are null. Is there a fix so that it will include records with null fields? Below is my code:
SELECT [Candidates Extended].[Contact Name], [Candidates Extended].Company, [Candidates Extended].[Job Title], [Candidates Extended].City, [Candidates Extended].State, [Candidates Extended].Status, [Candidates Extended].[Specialty 1], [Candidates Extended].[Specialty 2], [Candidates Extended].[Specialty 3], [Candidates Extended].[Specialty 4], [Candidates Extended].Category
FROM [Candidates Extended]
WHERE ((([Candidates Extended].[Contact Name]) Like "*" & [Forms]![Search Form]![Name] & "*") AND (([Candidates Extended].Company) Like "*" & [Forms]![Search Form]![Company] & "*") AND (([Candidates Extended].[Job Title]) Like "*" & [Forms]![Search Form]![Job Title] & "*") AND (([Candidates Extended].City) Like "*" & [Forms]![Search Form]![City] & "*") AND (([Candidates Extended].State) Like "*" & [Forms]![Search Form]![State] & "*") AND (([Candidates Extended].Status) Like "*" & [Forms]![Search Form]![Status] & "*") AND (([Candidates Extended].[Specialty 1]) Like "*" & [Forms]![Search Form]![Specialty] & "*") AND (([Candidates Extended].[Specialty 2]) Like "*" & [Forms]![Search Form]![Specialty] & "*") AND (([Candidates Extended].[Specialty 3]) Like "*" & [Forms]![Search Form]![Specialty] & "*") AND (([Candidates Extended].[Specialty 4]) Like "*" & [Forms]![Search Form]![Specialty] & "*") AND (([Candidates Extended].Category) Like "*" & [Forms]![Search Form]![Category] & "*"));
Thanks!