I have a db that is tracking a student fund raiser. I have a table of students, and a table to pledges collected. I want to create a query that has all the data from the students table, and then I want a 1/0 or a true/false based on whether or not there is a record in the pledgesCollected table. I am thinking something like:
SELECT tblStudents.FullName, IIf(EXISTS(SELECT StudentProceeds.Student FROM StudentProceeds WHERE StudentProceeds.Student = tblStudents.FullName),1,0) AS PledgesCollected
FROM tblStudents;
I get 'Data type mismatch in criteria expression.'
Any ideas of what I am doing wrong, or a better way to do this?
Thanks!
~john