Well here i am, puzzled again!
I have a search form with multiple criterias ...
e.g. firstname - text box, - lastname - text box, postcode - textbox. and so on.
When i have any two criteria in the criteria, it works beautifully.
IIf(IsNull([Forms]![frmSearch]![FirstName]),True,[FirstName] Like "*" & [Forms]![frmSearch]![FirstName] & "*")
IIf(IsNull([Forms]![frmSearch]![LastName]),True,[LastName] Like "*" & [Forms]![frmSearch]![LastName] & "*")
BUT! If i add a third (so now have; firstname, lastname, postcode) or more criteria, the query will not find the record.
AND I PROMISE THERE IS NO ERROR IN THE REFERENCE TO TEXTBOXES ETC
IIf(IsNull([Forms]![frmSearch]![PostalCode]),True,[PostalCode] Like "*" & [Forms]![frmSearch]![PostalCode] & "*")
LOL
I have a search form with multiple criterias ...
e.g. firstname - text box, - lastname - text box, postcode - textbox. and so on.
When i have any two criteria in the criteria, it works beautifully.
IIf(IsNull([Forms]![frmSearch]![FirstName]),True,[FirstName] Like "*" & [Forms]![frmSearch]![FirstName] & "*")
IIf(IsNull([Forms]![frmSearch]![LastName]),True,[LastName] Like "*" & [Forms]![frmSearch]![LastName] & "*")
BUT! If i add a third (so now have; firstname, lastname, postcode) or more criteria, the query will not find the record.
AND I PROMISE THERE IS NO ERROR IN THE REFERENCE TO TEXTBOXES ETC
IIf(IsNull([Forms]![frmSearch]![PostalCode]),True,[PostalCode] Like "*" & [Forms]![frmSearch]![PostalCode] & "*")
LOL