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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Another Crosstab with Parameters

Status
Not open for further replies.

kentwoodjean

Technical User
Oct 19, 2002
376
US
Last week I created a crosstab monthly report that used a drop down box on a form to set the criteria. It works perfectly. This week I am doing exactly the same thing but with a weekly report, and although I am using the same exact steps, it will not correctly make my selection I put the related form information in the Query Parameter box and when I run just the crosstab and enter the team Number or letter as prompted, it runs all the teams rather than my selection. Any ideas where I have messed up? Here is my #1 query and then the SQL of my crosstab.

#1 Query
SELECT [IWR Wkly].Team, [IWR Wkly].Reason, [IWR Wkly].ToDate, [IWR Wkly].LastName, [IWR Wkly].FirstName, [IWR Wkly].Ext, [IWR Wkly].TimesUsed, [IWR Wkly].Duration, [IWR Wkly].ReasonCde, [LastName] & "," & [FirstName] AS NAME
FROM [IWR Wkly]
GROUP BY [IWR Wkly].Team, [IWR Wkly].Reason, [IWR Wkly].ToDate, [IWR Wkly].LastName, [IWR Wkly].FirstName, [IWR Wkly].Ext, [IWR Wkly].TimesUsed, [IWR Wkly].Duration, [IWR Wkly].ReasonCde;

Crosstab Query
PARAMETERS [Forms]![IWRwkSelect]![cboTeam] Text ( 255 );
TRANSFORM Max([IDWR-Wkly].Duration) AS MaxOfDuration
SELECT [IDWR-Wkly].Team, [IDWR-Wkly].ToDate, [IDWR-Wkly].Reason
FROM [IDWR-Wkly]
WHERE (((DatePart("ww",[ToDate]))=DatePart("ww",Date())-1))
GROUP BY [IDWR-Wkly].Team, [IDWR-Wkly].ToDate, [IDWR-Wkly].Reason
PIVOT [IDWR-Wkly].NAME;



 
You are not using the parameter anywhere in your query so there is no selection going on.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top