Question : Access Query using Multiple tables and Count Function

In an Access Query, is there a way to take four tables and input COId(CompanyId) and have Table1 show count for chkR = True
Table2 show count for chkP = True
Table3 show count for chkY = True
Table4 show count for chkB = True

Result look like

COId chkR chkP chkY chkB
2615      3      2     10       6


Table1
COId
chkR

Table2
COId
chkP

Table3
COId
chkY

Table4
COId
chkB


Any help would greatly be appreciated.
 

Answer : Access Query using Multiple tables and Count Function

SELECT a.coid, Count(a.chkR) AS CountOfchkR, DCount("chkP","Table2","chkP  and coid = " & [a].[coid]) AS chkP, DCount("chky","Table3","chkY  and coid = " & [a].[coid]) AS chkY, DCount("chkb","Table4","chkB  and coid = " & [a].[coid]) AS chkB
FROM Table1 AS a
WHERE (((a.coid)=[Enter COID]))
GROUP BY a.coid, DCount("chkP","Table2","chkP  and coid = " & [a].[coid]), DCount("chky","Table3","chkY  and coid = " & [a].[coid]), DCount("chkb","Table4","chkB  and coid = " & [a].[coid])
HAVING (((Count(a.chkR))=True));
Random Solutions  
 
programming4us programming4us