What the heck am I doing wrong here? Probably everything, but hey...
Basically I am trying to get the query to sort by the value of txtLocation if the value of it is anything besides 0.
Dan
Basically I am trying to get the query to sort by the value of txtLocation if the value of it is anything besides 0.
Code:
SELECT
CASE WHEN ([Forms]![fReporting]![txtLocation]=0) THEN tData.sName, tData.sLocation
FROM tData
WHERE (((tData.bService)=-1) AND ((tData.bPending)=-1) AND ((tData.bRequirements)=-1))
ELSE tData.sName, tData.sLocation
FROM tData
WHERE (((tData.sLocation)=[Forms]![fReporting]![txtLocation]) AND ((tData.bService)=-1) AND ((tData.bPending)=-1) AND ((tData.bRequirements)=-1))
END
;
Dan