Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting a date criteria for crosstab query

Status
Not open for further replies.

techkenny1

Technical User
Jan 23, 2009
182
AU
Hi
Below is the sql code for a crosstab query;
Code:
TRANSFORM Sum(Accounts08.InvoiceTotal) AS SumOfInvoiceTotal
SELECT Accounts08.Companyname, Sum(Accounts08.InvoiceTotal) AS [Total Of InvoiceTotal]
FROM Accounts08
GROUP BY Accounts08.Companyname
PIVOT Format([DateRaised],"mmm-yyyy");

I need to be able to select a date ie; 1/7/10 to 31/7/10 to show sales per company for that date period.

many thanks

kp
 
You should create a form and add a couple text boxes to enter the start and end dates. With crosstabs, you must select the data type of all parameters/criteria.

Select Query->Parameters
Enter your parameters
Set their data type

Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top