Rewritten question

R

RobertM

Previous months comp total $10.00 (1)


Fund Date Comp (2) Credit
722A 3/1/05 ($0.02) $9.98 (3)
722A 3/2/05 $1.00 $10.98
722A 3/3/05 ($3.00) $7.98

I want to take the Previous months comp total (1) and add to it the
current days comp (2). The following day the query needs to take the
updated credit amount (3) and add to it the current days comp for the new
value.

I would like to somehow have a query hold this information. I need to show
this in both forms and reports.
 
M

Michel Walsh

Hi,



SELECT a.Fund, a.Date, LAST(a.Comp), SUM(b.Comp)
FROM myTable as A INNER JOIN myTable AS b
ON a.fund=b.fund AND a.date >= b.date
GROUP BY a.Fund, a.Date



Include the starting amount in a record, with a date in the last month, for
each Fund, under field Comp..


Hoping it may help,
Vanderghast, Access MVP
 
Top