Good Afternoon,
I am completely dumbfounded, hopefully someone in her can give me a kick in the right direction.
Goal: Create a report showing quote totals for each month by sales person.
Problem: Users must be able to choose the date range they want
What I have done so far: I have two text boxes that allow date input in standard format dd/mm/yyyy, or a user can click the calendar control and choose the date.
I have a query called qryTestAverage with the following syntax:
I then created a crosstab query to get my totals with the following syntax:
Now my dilema, how do I take the input from the textboxes and pass it using the docmd.openreport strwhere in a format that the crosstab will query correctly?
disregard thread703-1098482
I am completely dumbfounded, hopefully someone in her can give me a kick in the right direction.
Goal: Create a report showing quote totals for each month by sales person.
Problem: Users must be able to choose the date range they want
What I have done so far: I have two text boxes that allow date input in standard format dd/mm/yyyy, or a user can click the calendar control and choose the date.
I have a query called qryTestAverage with the following syntax:
Code:
SELECT Count(api_tblQuotes.QuoteID) AS NumberOfQuote, api_tblQuotes.QuoteDate, api_tblQuotes.[quote=Total], user_tblSalesmanProp.Description AS SalePerson, Month([QuoteDate]) AS MonthNum
FROM user_tblSalesmanProp INNER JOIN (user_tblAccountProp INNER JOIN api_tblQuotes ON user_tblAccountProp.ID = api_tblQuotes.Acct) ON user_tblSalesmanProp.ID = api_tblQuotes.Salesperson
GROUP BY api_tblQuotes.QuoteDate, api_tblQuotes.[quote=Total], user_tblSalesmanProp.Description, Month([QuoteDate]);
Code:
TRANSFORM Count(qryTestAverage.NumberOfQuote) AS CountOfNumberOfQuote
SELECT qryTestAverage.SalePerson, Count(qryTestAverage.NumberOfQuote) AS [Total Of NumberOfQuote]
FROM qryTestAverage
GROUP BY qryTestAverage.SalePerson
PIVOT Format([QuoteDate],"mmm") In ("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
disregard thread703-1098482