Joe Rojas
JRojas at tnco-inc.com
Wed May 11 08:08:44 CDT 2005
I have a report that only has a bar graph chart on it. What I am trying to do is have the user prompted for a date range that will be used to qualify what records are returned. I thought that if I change the two dates in the qReportData (see below) to something like [Enter Start Date] and [Enter End Date] that this would give me what I was looking for but instead I get an error message that reads: "The Microsoft Jet database engine does not recognize '[Enter Start Date]' as a valid field name or expression" Any ideas on how I can achieve this? Here are the 2 queries that I am using: Name: qUsedForChartData SELECT DMRCCRLog.DateOpened, DMRCCRLog.Department, Discrepencies.Disposition, DMRCCRLog.DocumentNum FROM DMRCCRLog INNER JOIN Discrepencies ON (DMRCCRLog.DocumentType = Discrepencies.DocumentType) AND (DMRCCRLog.DocumentNum = Discrepencies.DocumentNum) WHERE (((DMRCCRLog.DocumentType)="DMR")); Name: qReportData SELECT qUsedForChartData.Department, qUsedForChartData.Disposition, Count(*) AS NumOfDMRs FROM qUsedForChartData WHERE [DateOpened] BETWEEN #5/1/2005# AND #5/7/2005# GROUP BY qUsedForChartData.Department, qUsedForChartData.Disposition ORDER BY qUsedForChartData.Department, qUsedForChartData.Disposition; The chart uses the following for the row source: TRANSFORM Sum([NumOfDMRs]) AS [SumOfNumOfDMRs] SELECT [Department] FROM [qReportData] GROUP BY [Department] PIVOT [Disposition]; Thanks! JR This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email.