|
-
Dec 21st, 2011, 06:01 PM
#1
Thread Starter
Hyperactive Member
Access 2007: Simple math with fields
Hello Everyone:
I am trying to add and subtract fields from one another. I have fields called Balance, Debit and Credit. How do I get the balance to equal balance minus debit plus credit as a running total in my table? Just think of it as a check book. Please be specific on how to do this?
If this can’t be done what can I do?
Thanks
Art W.
SLEEP: A Totally Inadequate Substation For Caffeine!
-
Dec 22nd, 2011, 04:03 AM
#2
Frenzied Member
Re: Access 2007: Simple math with fields
colum a credit
colimn b debit
totalcredit cell = sum(column a)
totaldebit cell = sum(column b)
balance = totalcredit cell - totaldebit cell
you should be able to workout what to do from that
if you can't you will need to create a small example excell and post it so that we can put the absolute code in for you!
here to talk
-
Dec 22nd, 2011, 04:28 AM
#3
Re: Access 2007: Simple math with fields
balance is normally opening balance - sum all debits + sum all credits, not per transaction
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|