Here is the sql statement that I have right how that works.

SELECT DCount(""[Receipts]![receiptID]"",""Receipts"",""[UserName] = 'varUserName'"") AS Expr1, DSum(""[TransactionTbl]![TransPurchased]"",""[TransactionTbl]"",""[UserName] = 'varUserName'"") AS Expr2, [Expr2]-[Expr1] AS Expr3
FROM Receipts INNER JOIN TransactionTbl ON Receipts.UserName = TransactionTbl.UserName;

Table - "Receipt" has:
recieptID
UserName
receiptDate

Table - "TransactionTbl" has:
PurchasedDate
TransactionID
TransPurchased
UserName

Right now the sql count the total number of receipts and sums the total number of purchased and then
subtracts Expr1 from Expr2 to get remaining.

What I now need is a count of the total number of receipt greater than a receiptID of 200 and total number of purchases greater that a PurchasedDate of 01/11/2003.


Just cannot seem to make this work???

Thanks