Guys,
What's the write VBA syntax to include one query within the other?
Code
Query1 = "SELECT Count([AAA]) AS [CountOfAAA], Sum([BBB1]) AS [SumOfBBB1] FROM [Sheet1$] " & _
"GROUP BY [BBB], [CCC], [DDD], [EEE], [FFF], [JJJ], [KKK] " & _
"HAVING ((([FFF])='YES') AND (([JJJ])='No') AND (([KKK])='Active'))
Set Query1_rs = cn.Execute(Query1)
strQuery = "SELECT Sum([CountOfAAA]) AS [SumOfCountOfAAA], Sum([SumOfBBB1]) AS [SumOfSumOfBBB1] FROM Query1_rs"
Set rs = cn.Execute(strQuery)
The second query here does not work, what I made wrong?