Hi
I have never declared a parameter in a query before any help welcomed
I have a crosstab query based on another query called qryCountAgency2 in this query one of the columns is ReportYear which has the criteria set to Between [StartDate] And [EndDate].
When I run my crosstab qry I get a message saying it doesn't recognise StartDate. I have looked this up and it seems I need to declare the Parameter, but I'm not sure which query to put it in the qryCountAgency2 or the Crosstab query. I have a feeling I am writing the Parameter wrong as shown below
thanks Ron
PARAMETERS [ReportYear:] Between [StartDate] and [EndDate];
TRANSFORM Count(qrylCountAgency2.[CountOfAgencyName]) AS CountOfCountOfAgencyName
SELECT qrylCountAgency2.[AgencyName], Count(qrylCountAgency2.[CountOfAgencyName]) AS [Total Of CountOfAgencyName]
FROM qrylCountAgency2
GROUP BY qrylCountAgency2.[AgencyName]
PIVOT qrylCountAgency2.[ReportYear];PARAMETERS [ReportYear:] Between [StartDate] and [EndDate];
TRANSFORM Count(qrylCountAgency2.[CountOfAgencyName]) AS CountOfCountOfAgencyName
SELECT qrylCountAgency2.[AgencyName], Count(qrylCountAgency2.[CountOfAgencyName]) AS [Total Of CountOfAgencyName]
FROM qrylCountAgency2
GROUP BY qrylCountAgency2.[AgencyName]
PIVOT qrylCountAgency2.[ReportYear];
I have never declared a parameter in a query before any help welcomed
I have a crosstab query based on another query called qryCountAgency2 in this query one of the columns is ReportYear which has the criteria set to Between [StartDate] And [EndDate].
When I run my crosstab qry I get a message saying it doesn't recognise StartDate. I have looked this up and it seems I need to declare the Parameter, but I'm not sure which query to put it in the qryCountAgency2 or the Crosstab query. I have a feeling I am writing the Parameter wrong as shown below
thanks Ron
PARAMETERS [ReportYear:] Between [StartDate] and [EndDate];
TRANSFORM Count(qrylCountAgency2.[CountOfAgencyName]) AS CountOfCountOfAgencyName
SELECT qrylCountAgency2.[AgencyName], Count(qrylCountAgency2.[CountOfAgencyName]) AS [Total Of CountOfAgencyName]
FROM qrylCountAgency2
GROUP BY qrylCountAgency2.[AgencyName]
PIVOT qrylCountAgency2.[ReportYear];PARAMETERS [ReportYear:] Between [StartDate] and [EndDate];
TRANSFORM Count(qrylCountAgency2.[CountOfAgencyName]) AS CountOfCountOfAgencyName
SELECT qrylCountAgency2.[AgencyName], Count(qrylCountAgency2.[CountOfAgencyName]) AS [Total Of CountOfAgencyName]
FROM qrylCountAgency2
GROUP BY qrylCountAgency2.[AgencyName]
PIVOT qrylCountAgency2.[ReportYear];