Hi, and thank you for your reply,
let me explain more.
I have a table from Voucher no. 1 to no. 1000 with these records;
VoucherNo. VoucherAmount
1 20$
2 10$
3 30$
4 25$
.
.
.
1000 40$
Created a report based on a query which asks user to input the starting and
ending vouchers :
for expample if user gets the report from Voucher 3 to 5 ,
it will show;
VoucherNo. VoucherAmount AccumulatedSum
3 30 30
4 25 55
5 15 70
I could show a running sum for existing Vouchers in Query/Report,
But What I need is this;
VoucherNo. VoucherAmount AccumulatedSum
3 30 60
4 25 85
5 15 100
which shows an accumulated Sum from Voucher 1 to each current voucher,
meaning the accumulated sums are read from Table, not from Query which is
filtered to a range of voucher by user.
Hope this explained the problem.

Signature
Thans & Best regards
Leo, InfoSeeker
> How do you select the vouchers 100 to 300 in your query?
>
[quoted text clipped - 31 lines]
> > I tried it with DSUM, but could not find the result.
> > please help or give me an idea??!
John Spencer - 13 May 2008 16:58 GMT
I would expect to see a query that looked like
SELECT VoucherNo, VoucherAmt
, (SELECT Sum(VoucherAmt)
FROM YourTable as Tmp
WHERE Tmp.VoucherNo <= YourTable.VoucherNo) as RunningSum
FROM YourTable
WHERE VoucherNo Beween [Start No] and [End No]
Your other option would be to use the DSUM function as a calculated field
instead of the subquery.
DSUM("VoucherAmt","YourTable","VoucherNo Between 1 and " & [VoucherNo]) as
RunningSum
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
> Hi, and thank you for your reply,
> let me explain more.
[quoted text clipped - 29 lines]
> filtered to a range of voucher by user.
> Hope this explained the problem.
Leo - 14 May 2008 11:07 GMT
thank you so much,
I used your DSUM approach as unbound control on my report this way;
DSUM("VoucherAmt","YourTable","VoucherNo <= Reports!MyReports![VoucherNo]
AND VoucherNo >=1")

Signature
Thans & Best regards
Leo, InfoSeeker
> I would expect to see a query that looked like
>
[quoted text clipped - 49 lines]
> > filtered to a range of voucher by user.
> > Hope this explained the problem.