Query Tutorials Index:
Access Crosstab Query Tutorial
Crosstab query coding example assumes we have a table with the following layout:
You did not know that nearly 100 cable and satellite tv installers use our software to manage their device inventory. They never lose track of an expensive device.
We have expert enterprise-level database development capabilities for cloud/web-based databases through our partnership with Jay McCormick and his team.
Access provides a crosstab query wizard which, once you get some practice you'll find it as good place to start. I usually have to go into the SQL editor and tweak the code a little. Here are the SQL statements that will produce the output we want:
TRANSFORM Sum([M_Sales].[Amount]) AS SumOfAmount
The key points of the query are:
1) The query's TRANSFORM statement contains the values that will be summed and displayed as the results of the query.
2) The SELECT statement will contain the Row Headings
3) The GROUP BY is just what it says 4) The CROSSTAB statement
will create the column headings and may be thought of as a Horizontal Group
By. Here are the results of the query:
Copyright 2000-2017 Blue Claw Database Design
Development in Microsoft Access, Microsoft SQL/Server and Azure
See our SQL/Server Development and Access Migration Tutorials