Hi, I need to put together a report that queries a DB through access. I have been able in the past to put together simple queries, but this one is a little over my head, been at it for a few days now and am not making any progress, i just hope someone can push me in the right direction.
All that i need to get is a single figure of the last months sales from the database, i have been able to get the transactions for the last month and single amounts in access, all i need to now is total them up so that i can get that figure in a report, not sure how i would get that total figure though.
code:
SELECT VETRANS.DATETIME, VESALES.RETAIL_NET
FROM (VEDEPTS INNER JOIN VESALES ON VEDEPTS.DEPTID = VESALES.DEPTID) INNER JOIN VETRANS ON VESALES.TRANSID = VETRANS.TRANSID
GROUP BY VETRANS.DATETIME, VESALES.RETAIL_NET, VEDEPTS.NAME
HAVING (((VETRANS.DATETIME)>Date()-7) AND ((VEDEPTS.NAME) Like "021*" Or (VEDEPTS.NAME) Like "023*" Or (VEDEPTS.NAME) Like "024*"));
any assistance most appreciated.
Many Thanks
Yurov Ardyy
All that i need to get is a single figure of the last months sales from the database, i have been able to get the transactions for the last month and single amounts in access, all i need to now is total them up so that i can get that figure in a report, not sure how i would get that total figure though.
code:
SELECT VETRANS.DATETIME, VESALES.RETAIL_NET
FROM (VEDEPTS INNER JOIN VESALES ON VEDEPTS.DEPTID = VESALES.DEPTID) INNER JOIN VETRANS ON VESALES.TRANSID = VETRANS.TRANSID
GROUP BY VETRANS.DATETIME, VESALES.RETAIL_NET, VEDEPTS.NAME
HAVING (((VETRANS.DATETIME)>Date()-7) AND ((VEDEPTS.NAME) Like "021*" Or (VEDEPTS.NAME) Like "023*" Or (VEDEPTS.NAME) Like "024*"));
any assistance most appreciated.
Many Thanks
Yurov Ardyy