I'm not a Guru but here are a couple of SQL's to get you started.
note: change [yourtable]to your table name. [datein] and [price] to your field names.
(Regular query to select current year)
SELECT DISTINCTROW yourtable.DATEIN, yourtable.company, Format$([yourtable].[DATEIN],"mmmm yyyy"

AS [DATEIN By Month], Sum(yourtable.PRICE) AS SumOfPRICE
FROM yourtable
GROUP BY yourtable.DATEIN, yourtable.company, Format$([yourtable].[DATEIN],"mmmm yyyy"

HAVING (((yourtable.DATEIN)>#1/1/2002#));
(To select previous year)
SELECT DISTINCTROW yourtable.DATEIN, yourtable.company, Format$([yourtable].[DATEIN],"mmmm yyyy"

AS [DATEIN By Month], Sum(yourtable.PRICE) AS [Sum Of PRICE]
FROM yourtable
GROUP BY yourtable.DATEIN, yourtable.company, Format$([yourtable].[DATEIN],"mmmm yyyy"

, Year([yourtable].[DATEIN])*12+DatePart("m",[yourtable].[DATEIN])-1
HAVING (((yourtable.DATEIN)>#1/1/2001# And (yourtable.DATEIN)<#1/1/2002#));
----------------
(Crosstab query for first SQL)
TRANSFORM Sum(1stqname.[Sum Of PRICE]) AS [The Value]
SELECT 1stqname.company, Sum(1stqname.[Sum Of PRICE]) AS [Total Of Sum Of PRICE]
FROM 1stqname
GROUP BY 1stqname.company
PIVOT 1stqname.[DATEIN By Month];
(Crosstaba query for 2nd SQL)
The following SQL requires the "2ndqname query"
TRANSFORM Sum([2ndqname Query].SumOfPRICE) AS [The Value]
SELECT [2ndqname Query].company, Sum([2ndqname Query].SumOfPRICE) AS [Total Of SumOfPRICE]
FROM [2ndqname Query]
GROUP BY [2ndqname Query].company
PIVOT [2ndqname Query].[DATEIN By Month];
This gives you the total for the year for each company, and totals for each month for the year selected.
Make a report
Reporttab
new
report wizard and select the 1st crosstab query.
select
company
totalofsumofprice
month you want.
The report will list;
company Totalofsumofprice month
compa 123,456.78 16,123.00
compb 144,234.12 31,345.19
compc 2,210.59 241.95
(The sales rep really needs to pay more attention to compc)
The only problem is you have to change the month in the report for each succeeding month.
Does anyone know how to default to the present month?
I finally figured out how to get the last years totals. They will be in the report footer but they are there...
Create another report based on the 2nd crosstab SQL and use only one field."totalof sum of price"
Open the first report in design view and drag the new report to the reportfooter.
Adjust position as needed and add labels.
Hope this gives you something like what you are after.
Jim
10/18/02 8:40am PDT
I tried to post this but got a server error will try in a few minutes