I have a database looking up plant information (max height(m), max width(m), and the amount of light needed [shade medium sun]) from a table.
I have linked the form to the database using
[Forms]![Form1]![light] for light needed,
[Forms]![Form1]![Height] for max height and
[Forms]![Form1]![Width] for max width
in the queries/criteria
The problem is i need to use the wildcards less than, more than, less than and equal to, and more than and equal to certain heights.
( <, >, <=, >=)
But the text box doesn't allow any wildcards so it comes up with the error:
"The expression is typed incorrectly, or is too complex tobe evaluated. E.g a numeric expression may contain too many complicated elements. Try simplifying the expression by assigning parts of the expression to variables."
I wondered if a sql union query would work (seemed simpler to me than the combo box lookup) but it came up with the attached errors -
Data type mismatch in criteria expression, when my union query was
WHERE [Width] = "[Forms]![Form1]!combow.column0"
UNION SELECT [Height]
WHERE [Height]= "[Forms]![Form1]!comboh.column0"
UNION SELECT [Light Needed]
WHere [Light Needed] = "[Forms]![Form1]combol.column0";