run sum

G

Guest

i have a form that have a qty. i want to do it as report running sum.

e.g
Qty SumQty
10 10
20 30
30 60

how to do it? have anybody can help me? i dunno how to make the run sum. i
want the SumQty show. how? thanks for helping!
 
D

Douglas J. Steele

In a report? One of the properties of text boxes on reports is "RunningSum",
which you can set to No, "Over Group", or "Over All"
 
D

Douglas J. Steele

If you've got a primary key that you're sorting on, you can add a DSum to
your query. Something like:

SELECT MyTable.ID, MyTable.Field1, MyTable.Field2,
DSum("[Field2]","[MyTable]","[ID] <= " & [ID]) AS Running
FROM MyTable
ORDER BY MyTable.ID
 
G

Guest

Thanks Douglas J. Steele. it is works. thanks a lot!

Douglas J. Steele said:
If you've got a primary key that you're sorting on, you can add a DSum to
your query. Something like:

SELECT MyTable.ID, MyTable.Field1, MyTable.Field2,
DSum("[Field2]","[MyTable]","[ID] <= " & [ID]) AS Running
FROM MyTable
ORDER BY MyTable.ID


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


irene said:
no, i want do it in a form, not in report. so how i can do it? thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top