R
Ragnar
Hello,
I have been scratching my head over this problem so I hope someone can spot
what is wrong.
The CT query is:
TRANSFORM Val(Nz(Count([qryReviews].[Reviews]))) AS ReviewCount
SELECT [qryReviews].[DateRev], Val(Nz(Count([qryReviews].[Reviews]))) AS
DailyTotal
FROM qryReviews
GROUP BY [qryReviews].[DateRev]
PIVOT [qryReviews].[RevInits];
and the query it is selecting from is:
SELECT [Diagnosis CV].[Accession Number] AS Reviews,
[Diagnosis CV].[Date Reviewed] AS DateRev,
[Diagnosis CV].[Reviewer Initials] AS RevInits
FROM [Diagnosis CV]
WHERE
((([Diagnosis CV].[Date Reviewed])>=Forms!frmDateRange!txtStartDate
And ([Diagnosis CV].[Date Reviewed])<=Forms!frmDateRange!txtEndDate));
With the form frmDateRange open, and containing valid start and end dates, I
can run the select query with no problems.
However, when I run the CT query I get an error message that MS Jet database
engine does not recognize Forms!frmDateRange!txtEndDate as a valid field or
expression!
At first I noticed that the QBE had put square brackets around the items in
the date spec, like this [Forms]![frmDateRange]![txtEndDate], so I removed
them, but I still get the error message. I also tried with dots instead of
bangs, in all cases the bottom level query runs fine but the CT complains.
I am really puzzled because I have used excactly this construct, with a CT
query selecting from a subquery where the selection criteria are applied,
countless times and never had a problem.
Any help would be appreciated.
Ragnar
I have been scratching my head over this problem so I hope someone can spot
what is wrong.
The CT query is:
TRANSFORM Val(Nz(Count([qryReviews].[Reviews]))) AS ReviewCount
SELECT [qryReviews].[DateRev], Val(Nz(Count([qryReviews].[Reviews]))) AS
DailyTotal
FROM qryReviews
GROUP BY [qryReviews].[DateRev]
PIVOT [qryReviews].[RevInits];
and the query it is selecting from is:
SELECT [Diagnosis CV].[Accession Number] AS Reviews,
[Diagnosis CV].[Date Reviewed] AS DateRev,
[Diagnosis CV].[Reviewer Initials] AS RevInits
FROM [Diagnosis CV]
WHERE
((([Diagnosis CV].[Date Reviewed])>=Forms!frmDateRange!txtStartDate
And ([Diagnosis CV].[Date Reviewed])<=Forms!frmDateRange!txtEndDate));
With the form frmDateRange open, and containing valid start and end dates, I
can run the select query with no problems.
However, when I run the CT query I get an error message that MS Jet database
engine does not recognize Forms!frmDateRange!txtEndDate as a valid field or
expression!
At first I noticed that the QBE had put square brackets around the items in
the date spec, like this [Forms]![frmDateRange]![txtEndDate], so I removed
them, but I still get the error message. I also tried with dots instead of
bangs, in all cases the bottom level query runs fine but the CT complains.
I am really puzzled because I have used excactly this construct, with a CT
query selecting from a subquery where the selection criteria are applied,
countless times and never had a problem.
Any help would be appreciated.
Ragnar