crosstab queries and entered data parameters

gyang

Registered User.
Local time
Today, 10:26
Joined
Aug 5, 2002
Messages
11
When I entered the StartDate
of anything greater than 07/16/1999 in this
select query qryCrosstabTotalsDated (not a totals query, a regular select query)

I'm getting an error that reads:
The Microsoft Jet Database Engine doe snot recognize ''as a valid field name or expression.

qryCrosstabTotalsDated Raw SQL is:

SELECT qryCrosstabReportDated.TITLE,
IIf([CT] Is Null,0,[CT]) AS Connecticut,
IIf([NH] Is Null,0,[NH]) AS [New Hampshire],
IIf([VT] Is Null,0,[VT]) AS Vermont
FROM qryCrosstabReportDated;

qryCrosstabReportDated Raw SQL(this runs fine when I enter StartDate > 07/16/1999) is:
PARAMETERS [StartDate] DateTime, [EndDate] DateTime;
TRANSFORM Count(tblCredentials.CR_ID) AS CountOfCR_ID
SELECT NRC_VAL.TITLE
FROM tblCredentials INNER JOIN NRC_VAL ON tblCredentials.CR_CODE = NRC_VAL.TITLE_NUM
WHERE (((tblCredentials.CR_DATE) Between [StartDate] And [EndDate]))
GROUP BY NRC_VAL.TITLE
PIVOT tblCredentials.CRSTATE;

When running qryCrosstabReportDated there is a column header of <> since no CRSTATE appeared, but values did appear. Is that causing the problem?

How can I check if there is something wrong with how the data was inputted after 07/16/1999?

There is an input mask of 99/99/00;0;_
Is that causing the problem?

Quite perplexed?? Thanks for anything insight.
 
Did you set up your column headings? If not, go the the design mode of your crosstab query and the properties of the query and set up your cloumn headings. The name have to exactly match, otherwise it won't work. I think that will solve your problem:)
 
I'm not sure what I am suppose to put in the crosstab query under

Column Headings: View-->Query Properties-->
Column Headings. . .

Right now it's blank.

Is that where I'm suppose to put in something?

Thanks.
 
Thanks so much, Sohaila!!!

I looked up in the MS Help and it had examples of what to put in the Column Headings.

I would have no idea that I needed to do that.

Thanks!:)
 

Users who are viewing this thread

Back
Top Bottom