Hi I have a form that has several search criteria text fields on it, when some fields are blank the query fails to work even though I have used IIF statements in the query for fields that could possibly be blank.
Here is a copy of the query from sql view:
SELECT TRACKER.RecordID, TRACKER.SOCCSType, TRACKER.DateRaised, TRACKER.RaisedBy, TRACKER.Company, TRACKER.DueDate, TRACKER.Status, TRACKER.ClosedDate, TRACKER.Link
FROM TRACKER
WHERE (((TRACKER.SOCCSType)=IIf([Forms]![Search].[txtsoccstype]<>"",[Forms]![Search].[txtsoccstype],"*"
) AND ((TRACKER.Company) Like "*" & [Forms]![Search].[txtsearchcriteria] & "*"
AND ((TRACKER.Status)=IIf([Forms]![Search].[txtsoccstype]<>"",[Forms]![Search].[txtstatus],"*"
));
Can anyone help me?
Here is a copy of the query from sql view:
SELECT TRACKER.RecordID, TRACKER.SOCCSType, TRACKER.DateRaised, TRACKER.RaisedBy, TRACKER.Company, TRACKER.DueDate, TRACKER.Status, TRACKER.ClosedDate, TRACKER.Link
FROM TRACKER
WHERE (((TRACKER.SOCCSType)=IIf([Forms]![Search].[txtsoccstype]<>"",[Forms]![Search].[txtsoccstype],"*"
Can anyone help me?