Hi All
Im having trouble with the following SQL statement.
My problem is in the WHERE clause. All i want to know is if the Forms![Search]![cbxDivDirector] is Null (doesnt have a value in it) then i want the query to return "Eric Daniels" in the filter.
This works fine when the Form "Search" is in Design mode, but it bring up the parameter box if its in View mode.
I dont get why it does this?
Thanks
Im having trouble with the following SQL statement.
Code:
SELECT qrysearch.*
FROM qrysearch
WHERE IIf ( ISNULL ( Forms![Search]![cbxDivDirector] ) , [DIVISIONAL DIRECTOR] = "Eric Daniels", [DIVISIONAL DIRECTOR] = Forms![Search]![cbxDivDirector] )
My problem is in the WHERE clause. All i want to know is if the Forms![Search]![cbxDivDirector] is Null (doesnt have a value in it) then i want the query to return "Eric Daniels" in the filter.
This works fine when the Form "Search" is in Design mode, but it bring up the parameter box if its in View mode.
I dont get why it does this?
Thanks