I have query 1 with the following sql:
Code:
SELECT yp_adv_data.ID, yp_adv_data.adQCC, yp_adv_data.adSalesD, Count(yp_adv_data.adQCC) AS CountOfadQCC
FROM yp_adv_data
GROUP BY yp_adv_data.ID, yp_adv_data.adQCC, yp_adv_data.adSalesD
HAVING (((yp_adv_data.adQCC)=False) AND ((yp_adv_data.adSalesD) Is Not Null));
Then query 2 with the following sql:
Code:
SELECT yp_adv_data.ID, yp_adv_data.adQCDate, Count(yp_adv_data.adQCC) AS CountOfadQCC
FROM yp_adv_data
GROUP BY yp_adv_data.ID, yp_adv_data.adQCDate
HAVING (((yp_adv_data.adQCDate) Between Date() And Date()-6) AND ((Count(yp_adv_data.adQCC))=True));
With an append query pulling the information from both queries to another table:
Code:
INSERT INTO yp_qc ( qc_comp, qc_open )
SELECT Sum(qc_comp.CountOfadQCC) AS SumOfCountOfadQCC, Sum(qc_open.CountOfadQCC) AS SumOfCountOfadQCC1
FROM qc_comp, qc_open;
If there is an easier way I am all ears, but as of right now I am getting a new record in yp_qc. The fields are blank though, it is not pulling any data.