V
van_slanzar
I need help on calculating the amount of money the agencies for the company
has collected for the month specified, year to date, and the same month
compared to last year.
I have two tables Agency and Data.
Data
Cash collected would be called Amount.
Each day of the year cash is collected so it is called Date (daily, meaning
the values are usually 1/1/06,1/2/06, etc).
Agency
AgencyNumber represents the number assigned to the agency.
AgencyName is the name of the agency.
So basically I need the query to be able to calculate the month's total cash
collected for that agency, the amount of cash collected for the year from the
beginning to the specified month for that particular agency, and cash
collected for the month a year ago for that agency. I want to be able to turn
it into a report looking like this:
# Agency Mar 2005 YTD March 2004
X XXXXX 12345 5765985 13445
The dialog box for it won't be a problem for me its just the coding that's
giving me the trouble. Any help would be greatly appreciated.
Thanks!
has collected for the month specified, year to date, and the same month
compared to last year.
I have two tables Agency and Data.
Data
Cash collected would be called Amount.
Each day of the year cash is collected so it is called Date (daily, meaning
the values are usually 1/1/06,1/2/06, etc).
Agency
AgencyNumber represents the number assigned to the agency.
AgencyName is the name of the agency.
So basically I need the query to be able to calculate the month's total cash
collected for that agency, the amount of cash collected for the year from the
beginning to the specified month for that particular agency, and cash
collected for the month a year ago for that agency. I want to be able to turn
it into a report looking like this:
# Agency Mar 2005 YTD March 2004
X XXXXX 12345 5765985 13445
The dialog box for it won't be a problem for me its just the coding that's
giving me the trouble. Any help would be greatly appreciated.
Thanks!