If records in rows a and b are equal then

dbertanjoli

Registered User.
Local time
Today, 03:42
Joined
Sep 22, 2000
Messages
102
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
 
NewFieldName: IIf([a]= 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
 
As a follow-up to Mike's "semi" answer, here is the SQL for the request:
Code:
SELECT *
   FROM table
      WHERE [a] = [b] AND 
         [question ID] IN (SELECT [question ID]
      FROM table
   GROUP BY [question ID]
HAVING COUNT(*) > 1)
 
Many thanks, I don't know what I would do without Access Programmers Forum.
Deb
 

Users who are viewing this thread

Back
Top Bottom