Hi,
I have a crosstab query that is giving me the error message:
"The Microsoft Access database engine does not recognize 'h1.H1_Raft' as a valid field name or expression."
The underlying query works fine.
I don't understand this error, since I don't have a table or query called h1 and the field H1_Raft is not in the underlying queries.
I have read that this error can happen if you need parameters defined, but neither this crosstab query or the query below it require parameters.
Here is the underlying query:
SELECT
qryLocation_Present.Farm,
qryLocation_Present.Site,
qryLocation_Present.Row,
qryLocation_Present.Position,
qryLocation_Present.L_Position AS PresentLoc,
qryLocation_Present.Raft,
qryLocation_Present.MaxOfL_Date,
qryRaftList_hatchery_ALL.CurGrams,
IIf([L_Position]>0,IIf([Broodstock]=Yes,"BRD",IIf([SRED]=Yes,"SRED","PR")),"") AS Type
FROM
qryLocation_Present
LEFT JOIN
qryRaftList_hatchery_ALL
ON
qryLocation_Present.Raft = qryRaftList_hatchery_ALL.Raft;
Here is my crosstab query:
TRANSFORM
Avg(qryLoc_ALL.Raft) AS AvgOfRaft
SELECT
qryLoc_ALL.Site,
qryLoc_ALL.Position
FROM
qryLoc_ALL
GROUP BY
qryLoc_ALL.Site, qryLoc_ALL.Position
ORDER BY
qryLoc_ALL.Site, qryLoc_ALL.Position, qryLoc_ALL.Row
PIVOT qryLoc_ALL.Row;
Can anyone point me in the direction I should go to fix this?