field needs calc to subtract prev field

jedder18

Just Livin the Dream!
Local time
Today, 11:53
Joined
Mar 28, 2012
Messages
135
Working in Access 2007
Windows 7

Report should look like this in detail section

SITE Amt Balance
site 700.00 6800.00
site2 1,000.00 5800.00
site3 0 5800.00
site 4 500.00 5300.00

What it's doing is taking the amt fld from a static number of 7500.00 (fld resamt)


Searching for the code to come up with the balance field
the 1st entry works great :cool:

Any thoughts, ideas welcome.
 
you could try something like

Select site, amt, 7500 - (select sum(amt) from mytable as tmp where Site<=mytable.site) as balance from mytable order by site
 

Users who are viewing this thread

Back
Top Bottom