On a subform I want to display sales history as a crosstab query or a pivot table.
The user will select a product in a listbox on the main form and in the subform I want to display the sales history as follows:
Months on the year as rows
Years as columns
Sum of product sales as data
I always want to limit the sales history to the last 3 years. The year range is from Jan - Dec.
The data come from the following:
tblInvoice - InvoiceDate
tblInvoiceProduct - ProductId, Quantity
The two tables have a one-many relationship with field InvoiceId
What is the best method to accomplish this?
Many thanks in advance
The user will select a product in a listbox on the main form and in the subform I want to display the sales history as follows:
Months on the year as rows
Years as columns
Sum of product sales as data
I always want to limit the sales history to the last 3 years. The year range is from Jan - Dec.
The data come from the following:
tblInvoice - InvoiceDate
tblInvoiceProduct - ProductId, Quantity
The two tables have a one-many relationship with field InvoiceId
What is the best method to accomplish this?
Many thanks in advance