D
DS
I'm having a problem coding this subquery...
Not quite sure where to place the EXISTS.
Any help appreciated.
Thanks
DS
SELECT tblCheckDetails.CDBizDay
FROM tblCheckDetails
GROUP BY tblCheckDetails.CDBizDay
HAVING tblCheckDetails.CDBizDay>=[Forms]![frmReportDates]![TxtStart] And
tblCheckDetails.CDBizDay<=[Forms]![frmReportDates]![TxtEnd]
EXISTS
IN
(SELECT tblCheckDetails.CDQuantity, tblCheckDetails.CDPrice,
tblCheckDetails.CDDiscountDP, tblCheckDetails.CDDiscountAmount,
tblCheckDetails.CDDiscountPercent, tblCheckDetails.CDDiscountWhere,
tblCheckDetails.CDInclusive, tblCheckDetails.CDKillTax,
RepTax([CDKillTax],[CDInclusive],[CDDiscountWhere],[CDDiscountDP],[CDQuantity],[CDPrice],[CDTaxRate],[CDDiscountAmount],[CDDiscountPercent])
AS TX
FROM tblCheckDetails);
Not quite sure where to place the EXISTS.
Any help appreciated.
Thanks
DS
SELECT tblCheckDetails.CDBizDay
FROM tblCheckDetails
GROUP BY tblCheckDetails.CDBizDay
HAVING tblCheckDetails.CDBizDay>=[Forms]![frmReportDates]![TxtStart] And
tblCheckDetails.CDBizDay<=[Forms]![frmReportDates]![TxtEnd]
EXISTS
IN
(SELECT tblCheckDetails.CDQuantity, tblCheckDetails.CDPrice,
tblCheckDetails.CDDiscountDP, tblCheckDetails.CDDiscountAmount,
tblCheckDetails.CDDiscountPercent, tblCheckDetails.CDDiscountWhere,
tblCheckDetails.CDInclusive, tblCheckDetails.CDKillTax,
RepTax([CDKillTax],[CDInclusive],[CDDiscountWhere],[CDDiscountDP],[CDQuantity],[CDPrice],[CDTaxRate],[CDDiscountAmount],[CDDiscountPercent])
AS TX
FROM tblCheckDetails);