Microsoft Office Tutorials and References
In Depth Information
Choosing the query for the crosstab query
Figure 5-21
qryCustomersAndInvoices
query selected
queries list selected
2. Click the Next button to open the next Crosstab Query Wizard dialog box, in which
you choose the field (or fields) for the row headings. Because Oren wants the
crosstab query to display one row for each unique City field value, you will select
that field for the row headings.
3.
In the Available Fields list box, click City , and then click the
button to move
Tip
When you select a field,
Access changes the sample
crosstab query in the dia-
log box to illustrate your
choice.
the City field to the Selected Fields list box.
4. Click the Next button to open the next Crosstab Query Wizard dialog box, in which
you select the field values that will serve as column headings. Oren wants to see
the paid and unpaid total invoice amounts, so you need to select the InvoicePaid
field for the column headings.
5. Click InvoicePaid in the list box, and then click the Next button.
In the Crosstab Query Wizard dialog box that appears next, you choose the field
that will be calculated for each row and column intersection and the function to use
for the calculation. The results of the calculation will appear in the row and column
intersections in the query results. Oren needs to calculate the sum of the
InvoiceAmt field value for each row and column intersection.
6. Click InvoiceAmt in the Fields list box, click Sum in the Functions list box, and
then make sure that the Yes, include row sums check box is checked. The “Yes,
include row sums” option creates a column showing the overall totals for the values
in each row of the query recordset. See Figure 5-22.
 
Search JabSto ::




Custom Search