SELECT Questions.*, COUNT(UserCode) AS VoteCount, ; >> SUM( IIF(UserCode = lcUserCode, 1, 0)) AS VoteCountCurentUser ; >> FROM Questions ; >> LEFT JOIN Votes ; >> WHERE Questions.SurveyPK=Votes.SurveyPK ; >> ORDER BY CloseDate DESC ; >> GROUP BY SurveyPK ; >> INTO CURSOR TQuery >>>