O
O....
I have a table with Name, PostDate and amount.
John 1/1/2009 10.00
john 1/2/2009 20.00
john 1/3/2009 50.00
I need to subtract the amount from the prior date and so on. almost like a
running total but its the variance i want. thanks.
I got this suggestion but i get "#error" in amtprev and Variance
SELECT tblPosted.UserName, tblPosted.PostDate, tblPosted.Amount,
nz(DLookUp("Amount","tblPosted","PostDate= #" & [PostDate]-1 & "# AND
UserName='" & [UserName] & "'"),0) AS AmtPrev,
[Amount]-nz(DLookUp("Amount","tblPosted","PostDate= #" & [PostDate]-1 & "#
AND UserName='" & [UserName] & "'"),0) AS Variance
FROM tblPosted;
John 1/1/2009 10.00
john 1/2/2009 20.00
john 1/3/2009 50.00
I need to subtract the amount from the prior date and so on. almost like a
running total but its the variance i want. thanks.
I got this suggestion but i get "#error" in amtprev and Variance
SELECT tblPosted.UserName, tblPosted.PostDate, tblPosted.Amount,
nz(DLookUp("Amount","tblPosted","PostDate= #" & [PostDate]-1 & "# AND
UserName='" & [UserName] & "'"),0) AS AmtPrev,
[Amount]-nz(DLookUp("Amount","tblPosted","PostDate= #" & [PostDate]-1 & "#
AND UserName='" & [UserName] & "'"),0) AS Variance
FROM tblPosted;