This is as for as I have got with summing it by month. I am not sure why but I am getting 1 value on each line (looks almost like stairs) when I really do want to have the values on the same month if it is the same customer not one line with Jan03, one with Feb03 etc. I am not sure this make any sense but it is as good as I can explain it. I am pretty sure that I need to create a crosstab query with my data but I am not sure how to do that with my data.
Thank you all so much for the help I do appreciate it!
SELECT [BBB - Historical Invoice File].Customer, Format([Date into Access],"yyyy/mm") AS MonthDate, Sum(Abs([MonthDate]='2003/01')*[Unit Price]) AS Jan03, Sum(Abs([MonthDate]='2003/02')*[Unit Price]) AS Feb03, Sum(Abs([MonthDate]='2003/03')*[Unit Price]) AS Mar03, Sum(Abs([MonthDate]='2003/04')*[Unit Price]) AS Apr03, Sum(Abs([MonthDate]='2003/05')*[Unit Price]) AS May03, Sum(Abs([MonthDate]='2003/06')*[Unit Price]) AS Jun03, Sum(Abs([MonthDate]='2003/07')*[Unit Price]) AS Jul03, Sum(Abs([MonthDate]='2003/08')*[Unit Price]) AS Aug03, Sum(Abs([MonthDate]='2003/09')*[Unit Price]) AS Sep03, Sum(Abs([MonthDate]='2003/10')*[Unit Price]) AS Oct03, Sum(Abs([MonthDate]='2003/11')*[Unit Price]) AS Nov03, Sum(Abs([MonthDate]='2003/12')*[Unit Price]) AS Dec03
FROM [BBB - Historical Invoice File] LEFT JOIN [XXX - Customer Master File (USE THIS ONE)] ON [BBB - Historical Invoice File].Customer = [XXX - Customer Master File (USE THIS ONE)].Customer
GROUP BY [BBB - Historical Invoice File].Customer, Format([Date into Access],"yyyy/mm")
ORDER BY [BBB - Historical Invoice File].Customer;