ColumnHeadings Property Example
The following example creates four column headings (Qtr 1, Qtr 2, Qtr 3, Qtr 4) in Datasheet view of a crosstab query listing the quarterly orders by product. You enter the following statement in SQL view of the Query window.
TRANSFORM Sum(CCur([Order Details].UnitPrice * [Order Details].Quantity * (1-[Discount])/100) * 100)
AS ProductAmount SELECT Products.ProductName FROM Products
INNER JOIN (Orders INNER JOIN [Order Details] ON Orders.OrderID = [Order Details].OrderID)
ON Products.ProductID = [Order Details].ProductID
WHERE (((Orders.ShippedDate) Between #1/1/94# And #12/31/94#))
GROUP BY Products.ProductName PIVOT "Qtr " & DatePart("q",[ShippedDate],1,0);