Solved I Want to add Balance Column and Previous balance field in my Petty Cash Report. (1 Viewer)

Local time
Tomorrow, 00:23
Joined
Aug 19, 2021
Messages
212
Hi experts,
I need your help regarding petty cash report. I've created a petty cash with debit and credit column, I want to add Balance column, also want to add previous balance field as well. I am sharing screenshots of a Sample Petty Cash Report (Created in Ms Excel), DebitVoucher Table, DebitVoucherForm, PettyCashQuery, and PettyCash Report.

Thank you
SAMPLE PETTY CASH REPORT CREATED IN MS EXCEL
1632119295338.png

DEBIT VOUCHER TABLE
1632119405248.png

VOUCHER FORM
1632119470768.png

PETTY CASH QUERY
1632119629128.png
\
PETTY CASH REPORT
1632119656712.png

Kindly guide me how to do it.

Thank you
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 03:23
Joined
May 7, 2009
Messages
19,229
you just Create a summary of previous period (previous balance) in a query.
 

June7

AWF VIP
Local time
Today, 11:23
Joined
Mar 9, 2014
Messages
5,466
One approach:

1. textbox in report header section named tbxBalFor with DSum() calculation to provide total through specified end date
=DSum("AmountReceived - AmountPaid", "DataVoucher", "PaymentDate<#" & Forms!formname.tbxDate & "#")

2. textbox in report detail section named tbxAmt with calculation =AmountReceived - AmountPaid and set RunningSum property to Yes (this textbox can be set not visible)

3. textbox named tbxBal in report detail section with calculation =tbxAmt + tbxBalFor

4. apply date filter to report to limit records
DoCmd.OpenReport "reportname", , , "PaymentDate >= #" & Forms!formname.tbxDate & "#"

Another method to obtain starting balance and running balance: https://answers.microsoft.com/en-us...-balance/7317ea59-5cb5-462f-96ea-29fe93b5fbed
 
Last edited:
Local time
Tomorrow, 00:23
Joined
Aug 19, 2021
Messages
212
One approach:

1. textbox in report header section named tbxBalFor with DSum() calculation to provide total through specified end date
=DSum("AmountReceived - AmountPaid", "DataVoucher", "PaymentDate<#" & Forms!formname.tbxDate & "#")

2. textbox in report detail section named tbxAmt with calculation =AmountReceived - AmountPaid and set RunningSum property to Yes (this textbox can be set not visible)

3. textbox named tbxBal in report detail section with calculation =tbxAmt + tbxBalFor

4. apply date filter to report to limit records
DoCmd.OpenReport "reportname", , , "PaymentDate >= #" & Forms!formname.tbxDate & "#"

Another method to obtain starting balance and running balance: https://answers.microsoft.com/en-us...-balance/7317ea59-5cb5-462f-96ea-29fe93b5fbed
Hi can you tell me what is "DataVoucher" in the above code?
 

June7

AWF VIP
Local time
Today, 11:23
Joined
Mar 9, 2014
Messages
5,466
Sorry, I misread your image. Took closer look and see now table name is DebitVoucher.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 15:23
Joined
Feb 19, 2002
Messages
43,231
Reports provide a runningSum property. The options are Over All and Over Group. This may solve the problem without the overhead of domain functions or other queries.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 15:23
Joined
Feb 19, 2002
Messages
43,231
If you need a starting balance from data that is not included in the report, create a query that sums the data. Then make a union query to union the starting balance with the dtal for the report. Make sure to add a dummy field so you can make the starting balance sort first. Make the starting balance dummy value = 1 and the dummy in the other query = 2. Sort by the dummy and whatever other columns you need to sort by.
 

Users who are viewing this thread

Top Bottom