MS Access Tip – Quick Cash Flow Calculator
Posted by Jon WatsonJun 3
Access Success Story: Document Scanner Interface
Access Tip: Quick “Cash Flow” analysis tool
This is a simple tool but very handy Access tool that you can use to estimate how your cash or budget is going to expend over time. I use it and it is pretty handy, especially if your deposits and debits are irregular.
To use the tool simply enter all of your credits and debits in the cash amount column along with the date that the transaction will occur. There is a place for a description of the transaction as well. For example, if you know your payroll each month, enter the amount ahead of time with the dates as negative amounts in the “cash” column. I estimate my expenses and other costs and enter those amounts as well. Now that I have my regular expenses entered I can instantly see the impact that a credit will have on my cash balance in the future, or see how long the money will last. Again, once the data is entered you can instantly get a look at the impact of a date change for a payment s going to affect your cash balance out in the future.
You can change any future amounts and edit dates then press button to recalculate the cash amount in your account and instantly get a preview/estimate of your cash flow into the future. Preparation: Create a table with these fields and attributes:
Id ……autonumber
Cash ….currency
Date ….Date/time
Balance..currency
Desc…..Text
Save the table as “cashflow”
Next create a form with “cashflow” as the record source. Use a continuous form and place all the fields from the cashflow table on the form. Place the field labels in the form header, place the fields in the detail section and place a button to click for the calculation also in the form header.
Use any descriptive text for the button and any labels you desire to fill out the form.
Select the form and make it active. Then set these values on the Data tab:
Record source = cashflow
Order by = cashflow.date
Allow filters = yes
Allow deletions = yes
Allow additions = yes
Data entry = no
Enter this code on the Event tab “On Click” Event on the button you created to perform the calculations.
Dim sql1 As String
Dim db1 As DAO.Database
Dim rec2 As DAO.Recordset
Dim amnt As Currency
Dim bal As Currency, newbal As Currency
Dim cnt As Integer, counter As Integer
DoCmd.Requery
newbal = 0
Set db1 = CurrentDb()
sql1 = “SELECT cashflow.id, cashflow.Cash, cashflow.date, cashflow.balance, cashflow.desc FROM cashflow;”
Set rec2 = db1.OpenRecordset(sql1, dbOpenDynaset)
rec2.MoveLast
cnt = rec2.RecordCount
rec2.MoveFirst
counter = 0
DoCmd.GoToRecord , , acFirst
Do Until counter = cnt
newbal = newbal + Cash
Me.Balance.Value = newbal
counter = counter + 1
DoCmd.GoToRecord , , acNext
Loop
rec2.Close
Save the form and give it a try.
Notes: Enter debits as negative values in the amount column. Note: that as you proceed through the year, the fields get locked for past dates to preserve the data.
You must set the Microsoft DAO 3.6 VBA reference for this example to work. Look in the toolbar for Tools/References when you have the VBA editor open and check the box labeled Microsoft DAO 3.6 Object Library.
Access Solution Success: Document Manager for Scanning system
Situation
This customer had a small shop that ran a service to scan paper documents by the pallet load and return them electronically archived on DVD’s. The scanning software did not provide a cost effective way to categorize and search for the documents once scanned and stored. The customers needed a way to quickly find documents or folders of documents by searching for dates, or names, or record numbers etc, either singularly or in any combination without having to buy the expensive document manager from the scanner manufacturer.
Solution
We developed and access database that would interface with the output file of the scanner and automatically index all of the files in an access table. Then we provided a robust search environment allowing the user to enter any combination of search strings to locate a document or folder on the DVD. Lastly we provided a way to display the files quickly using the standard windows picture viewer.
Benefits
Our customer was able to provide a free tool to her customers for search and retrieval and gain an edge on her competition and increasing her sales.
You can find more Access help from BioMation Systems at any of the following locations: http://www.accessdatabasehelp.com
http://www.accesshelpebook.com
http://www.biomationsystems.com/AccessTips.htm
BioMation Systems develops and implements custom database applications for businesses of all sizes that solve complex office automation and data management problems enabling our partners to focus more on growing their business and satisfying their customers.
The information in the Access tip is for educational purposes aimed at the novice to intermediate Access user. This tip worked as described on the computer systems at BioMation Systems using Access 2000 and is not supported.
BioMation Systems, Inc. www.biomationsystems.com
Jon Watson is the founder of Biomation Systems, Inc. With over 20 years experience helping Fortune 500 companies with process improvement he formed BioMation to bring the same expertise to smaller companies that need the same improvements at an affordable price.
Contact the Author
Permalink to MS Access Tip – Quick Cash Flow Calculator
Leave a Reply