How would I perform a Where, in a SQL command, only if the item is not equal to "<All>"
Currently I have
WHERE Q4.AgentGroup= [Forms]![frmCDErrorReports]![Group]
But, the first item in the dropdown [group] is "<All>"
Is there a way to structure the Where so it doesn't limit anything if "<All>" is selected?
Edit 1:
I tried
WHERE Q4.AgentGroup= iif([Forms]![frmCDErrorReports]![Group]='<All>','*',[Forms]![frmCDErrorReports]![Group])
hoping that the * would allow the where to grab everything, but its just comparing the two, and because no group is = * it isn't giving any results.
Edit 2:
Just tried this also
Didn't work, always gets all the agent groups.Code:WHERE iif(Forms!frmCDErrorReports!Group='<All>','','Q4.AgentGroup=Forms!frmCDErrorReports!Group')


Reply With Quote
