If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Crosstab Query?-NOT BLANK
i want myspace....
"KARL DEWEY" wrote: You can do it with multiple queries. PMLogQuery-1 SELECT "X" AS x, Sum(1) AS [Completed last month] FROM TblPMLog WHERE (((Format([DateCompleted],"m yyyy"))=Format(Date()-Day(Date()),"m yyyy"))) GROUP BY "X"; PMLogQuery-2 SELECT "X" AS x, Sum(1) AS [Completed as scheduled] FROM TblPMLog WHERE ((((Format([StartDate],"m yyyy")))=Format(Date()-Day(Date()),"m yyyy"))) GROUP BY "X"; PMLogQuery-3 SELECT "X" AS x, Sum(1) AS [Completed from prior months] FROM TblPMLog WHERE (((Format([StartDate],"m yyyy"))=Format(Date()-Day(Date()),"m yyyy")) AND ((Format([DateCompleted],"m yyyy"))=Format(Date()-Day(Date()),"m yyyy"))) GROUP BY "X"; PM_Log SELECT [PMLogQuery-1].[Completed last month], [PMLogQuery-2].[Completed as scheduled], [PMLogQuery-3].[Completed from prior months] FROM [PMLogQuery-1], [PMLogQuery-2], [PMLogQuery-3]; "DissentChick" wrote: Sorry for the previous blank post, finger slipped. Hi there, I am having trouble designing a query to bring the following information so I can put it all on one report (I'm not opposed to using subreports): Number of PM's issued by month, no. of issued PM's for month completed in month, and the # of previously issued PM's completed within that month.My fields a Tbl PMLog PMOrderID StartDate DateCompleted (The StartDate is the issue date) What kind of query would I use, and if it is a crosstab, how do I set it up? I have never used them. Thanks so much in advance! -- Aaron Regular, Dissent Records www dot nbtnc dot com |
Thread Tools | |
Display Modes | |
|
|