I have a form that allows the user to select a date range and then a couple of textboxes that allow for criteria. The below works if you enter data into only one of the textboxes 45 or 47, but when you have criteria in both it produces no results. Am I missing something?
Code:
SELECT History.MACCODE, History.Department, History.IndividualName, History.Address, History.Address2, History.Address3, History.City, History.State, History.Zip, History.LabelType, History.PrintDate
FROM History
WHERE ((History.MACCODE Like [Forms]![frmtele]![Text45] & "*" & "*" & "*" & "-" & "*" & "*" & "*")
Or ([Forms]![frmtele]![Text45] IS Null))
AND((History.MACCODE Like [Forms]![frmtele]![Text47] & "*" & "*" & "*" & "-" & "*" & "*" & "*")
Or ([Forms]![frmtele]![Text47] IS Null))