Originally Posted by
accessnewb
maybe what I have done is totally wrong, but based on your inputs this is the query I came up with:
SELECT Contacts.ContactName, Contacts.ItemNo, Contacts.NDC
FROM Contacts
WHERE (((Contacts.ContactName) Like (([Contacts].[ContactName])="*" & [Forms]![F_Contacts_Search].[txtContactName] & "*" Or [Forms]![F_Contacts_Search].[txtContactName] Is Null)) AND ((Contacts.ItemNo) Like (([Contacts].[ItemNo])="*" & [Forms]![F_Contacts_Search].[txtItemNo] & "*" Or [Forms]![F_Contacts_Search].[txtItemNo] Is Null)) AND ((Contacts.NDC) Like (([Contacts].[NDC])="*" & [Forms]![F_Contacts_Search].[txtNDC] & "*" Or [Forms]![F_Contacts_Search].[txtNDC] Is Null)));
Something must be wrong in the above query. Cos now I get no results when I query this!