dbertanjoli
04-26-2008, 05:58 PM
Hello,
I would like to show records in my query only if records in raw a and b are equal and they have same question id.
Please let me know if you can help.
Many thanks,
Debbie
Mike375
04-26-2008, 06:16 PM
NewFieldName: IIf([a]=[b] And [aQuestionID]=[bQuestionID],"Same",Null)
Replace "same" and Null with whatever like.
Then on the calculated field NewFieldName enter on the Criteria row Like "Same" or whatever you have selected for the true answer from IIF
ajetrumpet
04-26-2008, 07:22 PM
As a follow-up to Mike's "semi" answer, here is the SQL for the request:SELECT *
FROM table
WHERE [a] = [b] AND
[question ID] IN (SELECT [question ID]
FROM table
GROUP BY [question ID]
HAVING COUNT(*) > 1)
dbertanjoli
04-27-2008, 08:10 PM
Many thanks, I don't know what I would do without Access Programmers Forum.
Deb