G
Guest
Problem#1
This query is supposed to generate a running total on a savings account. The
RUNNING TOTAL column attempts it by using dates, the BALANCE attempts it by
using TRANSNUM (basically a sequential number attached to the record).
RUNNING TOTAL generates an erroneous balance, and BALANCE generates an #ERROR
SELECT tblSavingsFrancine.EMPID, tblSavingsFrancine.TransDate,
tblSavingsFrancine.Transaction, DatePart("m",[TransDate]) AS Amonth,
DatePart("d",[transdate]) AS ADay,
FormatCurrency(DSum("[transaction]","tblsavings","DatePart('m',
[transdate])<=" & [AMonth] & " And DatePart('d', [transdate])<=" & [Aday] &
""),2) AS [Running Total],
FormatCurrency(nz(DSum([transaction],"tblExpenseAccount","[TransNum] <= " &
[TransNum]),0),-1,0,0,0) AS Balance, tblSavingsFrancine.TransClass
FROM tblSavingsFrancine
ORDER BY tblSavingsFrancine.EMPID, DatePart("m",[TransDate]),
DatePart("d",[transdate]);
I have to use this query to build another query to append "interest" records
to the same savings table and from there I do a running sum report.
Thanks..Juanita
This query is supposed to generate a running total on a savings account. The
RUNNING TOTAL column attempts it by using dates, the BALANCE attempts it by
using TRANSNUM (basically a sequential number attached to the record).
RUNNING TOTAL generates an erroneous balance, and BALANCE generates an #ERROR
SELECT tblSavingsFrancine.EMPID, tblSavingsFrancine.TransDate,
tblSavingsFrancine.Transaction, DatePart("m",[TransDate]) AS Amonth,
DatePart("d",[transdate]) AS ADay,
FormatCurrency(DSum("[transaction]","tblsavings","DatePart('m',
[transdate])<=" & [AMonth] & " And DatePart('d', [transdate])<=" & [Aday] &
""),2) AS [Running Total],
FormatCurrency(nz(DSum([transaction],"tblExpenseAccount","[TransNum] <= " &
[TransNum]),0),-1,0,0,0) AS Balance, tblSavingsFrancine.TransClass
FROM tblSavingsFrancine
ORDER BY tblSavingsFrancine.EMPID, DatePart("m",[TransDate]),
DatePart("d",[transdate]);
I have to use this query to build another query to append "interest" records
to the same savings table and from there I do a running sum report.
Thanks..Juanita