I have the following query
I get an error:
I have three text boxes in my form and I want to be able to search by any of them. Item.PK and item.account are numbers and items.sample is a string. The results of the query are linked to a list box and I have some background code involved, but the problem seems to be in the query.
Is it just too complex to have three criteria like this?
Code:
SELECT items.itemKey, item.sample AS [Sample ID], item.PK AS EMPI, item.account AS Account
FROM items
WHERE (((items.sample) Like "*" & [forms]![tubetrack].[SampleID] & "*")) OR (((items.PK)=[forms]![tubetrack].[EMPI])) OR (((items.account)=[forms]![tubetrack].[AccountNo]));
I get an error:
This expression is typed incorrectly, or it is too complex to be evaluated. . .
I have three text boxes in my form and I want to be able to search by any of them. Item.PK and item.account are numbers and items.sample is a string. The results of the query are linked to a list box and I have some background code involved, but the problem seems to be in the query.
Is it just too complex to have three criteria like this?