Code:
SELECT NZ(Count([Compromised TFN - master].Team_Id),0) AS CountOfTeam_Id, [Compromised TFN - master].Acty_Priority, [Compromised TFN - master].Acty_Cmplxty
FROM [Compromised TFN - master]
GROUP BY [Compromised TFN - master].Team_Id, [Compromised TFN - master].Acty_Cntct_Typ_Nm, [Compromised TFN - master].Intractn_Sts, [Compromised TFN - master].Acty_Priority, [Compromised TFN - master].Acty_Cmplxty
HAVING ((([Compromised TFN - master].Team_Id)=1743) AND (([Compromised TFN - master].Acty_Cntct_Typ_Nm)="REG Compromised TFN") AND (([Compromised TFN - master].Intractn_Sts)="Information Pending") AND (([Compromised TFN - master].Acty_Priority)="3-Medium") AND (([Compromised TFN - master].Acty_Cmplxty)="Low"))
UNION ALL
SELECT NZ(Count([Compromised TFN - master].Team_Id),0) AS CountOfTeam_Id, [Compromised TFN - master].Acty_Priority, [Compromised TFN - master].Acty_Cmplxty
FROM [Compromised TFN - master]
GROUP BY [Compromised TFN - master].Team_Id, [Compromised TFN - master].Acty_Cntct_Typ_Nm, [Compromised TFN - master].Intractn_Sts, [Compromised TFN - master].Acty_Priority, [Compromised TFN - master].Acty_Cmplxty
HAVING ((([Compromised TFN - master].Team_Id)=1743) AND (([Compromised TFN - master].Acty_Cntct_Typ_Nm)="REG Compromised TFN") AND (([Compromised TFN - master].Intractn_Sts)="Information Pending") AND (([Compromised TFN - master].Acty_Priority)="3-Medium") AND (([Compromised TFN - master].Acty_Cmplxty)="Medium"))
UNION ALL
SELECT NZ(Count([Compromised TFN - master].Team_Id),0) AS CountOfTeam_Id, [Compromised TFN - master].Acty_Priority, [Compromised TFN - master].Acty_Cmplxty
FROM [Compromised TFN - master]
GROUP BY [Compromised TFN - master].Team_Id, [Compromised TFN - master].Acty_Cntct_Typ_Nm, [Compromised TFN - master].Intractn_Sts, [Compromised TFN - master].Acty_Priority, [Compromised TFN - master].Acty_Cmplxty
HAVING ((([Compromised TFN - master].Team_Id)=1743) AND (([Compromised TFN - master].Acty_Cntct_Typ_Nm)="REG Compromised TFN") AND (([Compromised TFN - master].Intractn_Sts)="Information Pending") AND (([Compromised TFN - master].Acty_Priority)="3-Medium") AND (([Compromised TFN - master].Acty_Cmplxty)="High"))
UNION ALL
SELECT NZ(Count([Compromised TFN - master].Team_Id),0) AS CountOfTeam_Id, [Compromised TFN - master].Acty_Priority, [Compromised TFN - master].Acty_Cmplxty
FROM [Compromised TFN - master]
GROUP BY [Compromised TFN - master].Team_Id, [Compromised TFN - master].Acty_Cntct_Typ_Nm, [Compromised TFN - master].Intractn_Sts, [Compromised TFN - master].Acty_Priority, [Compromised TFN - master].Acty_Cmplxty
HAVING ((([Compromised TFN - master].Team_Id)=1743) AND (([Compromised TFN - master].Acty_Cntct_Typ_Nm)="REG Compromised TFN") AND (([Compromised TFN - master].Intractn_Sts)="Information Pending") AND (([Compromised TFN - master].Acty_Priority)="4-Low") AND (([Compromised TFN - master].Acty_Cmplxty)="Low"))
UNION ALL
SELECT NZ(Count([Compromised TFN - master].Team_Id),0) AS CountOfTeam_Id, [Compromised TFN - master].Acty_Priority, [Compromised TFN - master].Acty_Cmplxty
FROM [Compromised TFN - master]
GROUP BY [Compromised TFN - master].Team_Id, [Compromised TFN - master].Acty_Cntct_Typ_Nm, [Compromised TFN - master].Intractn_Sts, [Compromised TFN - master].Acty_Priority, [Compromised TFN - master].Acty_Cmplxty
HAVING ((([Compromised TFN - master].Team_Id)=1743) AND (([Compromised TFN - master].Acty_Cntct_Typ_Nm)="REG Compromised TFN") AND (([Compromised TFN - master].Intractn_Sts)="Information Pending") AND (([Compromised TFN - master].Acty_Priority)="4-Low") AND (([Compromised TFN - master].Acty_Cmplxty)="Medium"))
UNION ALL
SELECT NZ(Count([Compromised TFN - master].Team_Id),0) AS CountOfTeam_Id, [Compromised TFN - master].Acty_Priority, [Compromised TFN - master].Acty_Cmplxty
FROM [Compromised TFN - master]
GROUP BY [Compromised TFN - master].Team_Id, [Compromised TFN - master].Acty_Cntct_Typ_Nm, [Compromised TFN - master].Intractn_Sts, [Compromised TFN - master].Acty_Priority, [Compromised TFN - master].Acty_Cmplxty
HAVING ((([Compromised TFN - master].Team_Id)=1743) AND (([Compromised TFN - master].Acty_Cntct_Typ_Nm)="REG Compromised TFN") AND (([Compromised TFN - master].Intractn_Sts)="Information Pending") AND (([Compromised TFN - master].Acty_Priority)="4-Low") AND (([Compromised TFN - master].Acty_Cmplxty)="High"))
UNION ALL
SELECT NZ(Count([Compromised TFN - master].Team_Id),0) AS CountOfTeam_Id, [Compromised TFN - master].Acty_Priority, [Compromised TFN - master].Acty_Cmplxty
FROM [Compromised TFN - master]
GROUP BY [Compromised TFN - master].Team_Id, [Compromised TFN - master].Acty_Cntct_Typ_Nm, [Compromised TFN - master].Intractn_Sts, [Compromised TFN - master].Acty_Priority, [Compromised TFN - master].Acty_Cmplxty
HAVING ((([Compromised TFN - master].Team_Id)=1743) AND (([Compromised TFN - master].Acty_Cntct_Typ_Nm)="REG Compromised TFN") AND (([Compromised TFN - master].Intractn_Sts)="Information Pending") AND (([Compromised TFN - master].Acty_Priority)="2-High") AND (([Compromised TFN - master].Acty_Cmplxty)="Low"))
UNION ALL
SELECT NZ(Count([Compromised TFN - master].Team_Id),0) AS CountOfTeam_Id, [Compromised TFN - master].Acty_Priority, [Compromised TFN - master].Acty_Cmplxty
FROM [Compromised TFN - master]
GROUP BY [Compromised TFN - master].Team_Id, [Compromised TFN - master].Acty_Cntct_Typ_Nm, [Compromised TFN - master].Intractn_Sts, [Compromised TFN - master].Acty_Priority, [Compromised TFN - master].Acty_Cmplxty
HAVING ((([Compromised TFN - master].Team_Id)=1743) AND (([Compromised TFN - master].Acty_Cntct_Typ_Nm)="REG Compromised TFN") AND (([Compromised TFN - master].Intractn_Sts)="Information Pending") AND (([Compromised TFN - master].Acty_Priority)="2-High") AND (([Compromised TFN - master].Acty_Cmplxty)="Medium"))
UNION ALL SELECT NZ(Count([Compromised TFN - master].Team_Id),0) AS CountOfTeam_Id, [Compromised TFN - master].Acty_Priority, [Compromised TFN - master].Acty_Cmplxty
FROM [Compromised TFN - master]
GROUP BY [Compromised TFN - master].Team_Id, [Compromised TFN - master].Acty_Cntct_Typ_Nm, [Compromised TFN - master].Intractn_Sts, [Compromised TFN - master].Acty_Priority, [Compromised TFN - master].Acty_Cmplxty
HAVING ((([Compromised TFN - master].Team_Id)=1743) AND (([Compromised TFN - master].Acty_Cntct_Typ_Nm)="REG Compromised TFN") AND (([Compromised TFN - master].Intractn_Sts)="Information Pending") AND (([Compromised TFN - master].Acty_Priority)="2-High") AND (([Compromised TFN - master].Acty_Cmplxty)="High"));