ajetrumpet
Banned
- Local time
- Today, 00:15
- Joined
- Jun 22, 2007
- Messages
- 5,638
I am having a bit of trouble with some SQL now that looks like the following....
Can someone tell me where I have gone wrong??
The idea is to get a range of values with the "IIF" function (>=control value) if a value is manually entered into the control and a set value from the query if the control is left blank.
Code:
SELECT [fields]
FROM [table]
WHERE ([field]=[control1])
AND (IIf([control2] Is Null,"[set value]","[>=control2 value]"));
The idea is to get a range of values with the "IIF" function (>=control value) if a value is manually entered into the control and a set value from the query if the control is left blank.