jet database engine does not recognize...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fd1
    New Member
    • Sep 2007
    • 38

    jet database engine does not recognize...

    I have a query that works fine when it's run on its own but when it's included within another query it breaks the other query and I get the following error:

    The jet database engine does not recognize 'tblComments.re fSAR_ID' as a valid field name or expression

    Can anyone tell me what am I doing wrong here?


    This is the query in question:
    Code:
    SELECT tblBalance.SAR_ID, tblComments.Comment
    FROM tblBalance LEFT JOIN tblComments ON tblBalance.SAR_ID = tblComments.refSAR_ID
    WHERE (((tblComments.CDate)=(SELECT Max(X.CDate) FROM tblComments As X WHERE X.refSAR_ID = tblComments.refSAR_ID) Or (tblComments.CDate) Is Null));

    This is the code for the the other query:
    Code:
    SELECT tblBalance.SAR_ID, qryConst.Team, qryConst.[Team Code]
    FROM qryConst, tblBalance INNER JOIN qryComm ON tblBalance.SAR_ID = qryComm.SAR_ID;
    qryConst is a crosstab query and from what I can tell, I'm getting the error whenever qryConst and qryComm (from my original post) are together.

    and here's the code for the crosstab query qryConst:
    Code:
    TRANSFORM First(xtblConst.Value) AS FirstOfValue
    SELECT xtblConst.order
    FROM xtblConst
    GROUP BY xtblConst.order
    PIVOT xtblConst.Title;
    Last edited by Niheel; May 28 '10, 08:40 PM. Reason: merged question details
Working...