G
Guest
The query below is giving me an error message "can't find the name
tblTemp!YrPrd you entered in the expression". Here's the SQL:
SELECT CnvStatus, DocType, Year, PrdNbr, YrPrd, OCrp, OAcct, HComp, HAcct,
EndBal, DSum("[EndBal]","[tblHGLDetailsSummaryBS_woDesc]","[YrPrd] <
[tblTemp]![YrPrd]") AS BegBal
FROM tblHGLDetailsSummaryBS_woDesc INNER JOIN tblHGLDetailsSummaryBS_woDesc
AS tblTemp ON (YrPrd = tblTemp.YrPrd) AND (HAcct = tblTemp.HAcct) AND (HComp
= tblTemp.HComp) AND (OAcct = tblTemp.OAcct) AND (OCrp = tblTemp.OCrp) AND
(PrdNbr = tblTemp.PrdNbr) AND (Year = tblTemp.Year) AND (DocType =
tblTemp.DocType) AND (CnvStatus = tblTemp.CnvStatus);
The calculation for BegBal is intended to be the sum of EndBal where YrPrd <
tblTemp.YrPrd, but obviously something isn't working right. Any advice would
be appreciated!
tblTemp!YrPrd you entered in the expression". Here's the SQL:
SELECT CnvStatus, DocType, Year, PrdNbr, YrPrd, OCrp, OAcct, HComp, HAcct,
EndBal, DSum("[EndBal]","[tblHGLDetailsSummaryBS_woDesc]","[YrPrd] <
[tblTemp]![YrPrd]") AS BegBal
FROM tblHGLDetailsSummaryBS_woDesc INNER JOIN tblHGLDetailsSummaryBS_woDesc
AS tblTemp ON (YrPrd = tblTemp.YrPrd) AND (HAcct = tblTemp.HAcct) AND (HComp
= tblTemp.HComp) AND (OAcct = tblTemp.OAcct) AND (OCrp = tblTemp.OCrp) AND
(PrdNbr = tblTemp.PrdNbr) AND (Year = tblTemp.Year) AND (DocType =
tblTemp.DocType) AND (CnvStatus = tblTemp.CnvStatus);
The calculation for BegBal is intended to be the sum of EndBal where YrPrd <
tblTemp.YrPrd, but obviously something isn't working right. Any advice would
be appreciated!