A family of Microsoft relational database management systems designed for ease of use.
Below is a report based on the following simple crosstab query:
TRANSFORM Nz(Sum(Amount),0)
SELECT Format(SaleDate,"mmmm yyyy") AS [Month],
SUM(Amount*IIF(Salestype IN ("Cash","Credit"),1,0)) AS TotalSales
FROM Sales
GROUP BY FORMAT(SaleDate,"mmmm yyyy")
ORDER BY Year(SaleDate), Month(SaleDate)
PIVOT Amount IN ("Cash","Credit");
The maximum Amount in each of the three columns is shown in red by means of the following conditional formatting expressions:
[TotalSales]=DMax("TotalSales","qrySalesByMonth")
[Cash]=DMax("TotalCash","qrySalesByMonth")
[Credit]=DMax("TotalCredit","qrySalesByMonth")
The qrySalesByMonth query is as follows:
SELECT Format(SaleDate,"mmmm yyyy") AS SaleMonth,
SUM(Amount) AS TotalSales,
SUM(Amount * IIF(SalesType="Cash",1,0)) AS TotalCash,
SUM(Amount * IIF(SalesType="Credit",1,0)) AS TotalCredit
FROM Sales
GROUP BY Format(SaleDate,"mmmm yyyy");
In your case you'd need to include some criterion in the conditional formatting expressions, and in your eqivalent of the qrySalesByMonth query to restrict the formatting and the query to group A only.