Cross Tab Query

rishi_375

Registered User.
Local time
Today, 03:50
Joined
Dec 23, 2003
Messages
37
Hi,
How can i pass Cross tab query Parameter value from Forms object, as i try to generate recordset?


Following query i have written :

PARAMETERS [Forms]![frmParamSummaryReport]![txtFromDate]![Value] Long;
TRANSFORM Sum([Usage].[UsageValue]) AS [SumOfThe Value]
SELECT [Usage].[ST_DATE] AS STDate, format([Usage].[ST_DATE],'mmm yy') AS [Month]
FROM Usage
WHERE [Usage].[ST_DATE]<=[Forms]![frmParamSummaryReport]![txtFromDate]!Value
GROUP BY [Usage].[ST_DATE], DatePart('m',[Usage].[ST_DATE])
PIVOT [FY];

and in Form i call this query and in the txtFromDate is Text box.


Please advise.
Thanks.
 

Users who are viewing this thread

Back
Top Bottom