PDA

View Full Version : showing running total in a text box



wasim_sono
04-09-2006, 10:42 PM
Dear All

First of all I'm sorry for cross forum. I post this in accessforums.net but never replied. So I decided to log here for finding solution. May be I can't dfine what I need if so plese intimate me for that. the problem is that:

I'm designing a form for Bank transactions. For this I have fields Debit. Credit, Balance, Cheque no etc.... I need to show the balance in balance field as if user enters amount in Debit field then the balance field minus that amount from Balance field and similarly if he enters amount in Credit field then balance field plus that amount in balance field. I think balance filed should show running total but how I don't know.
If anyone solve this problem I 'll be very thankful.


Regards.

Wasim

OBP
04-10-2006, 03:16 AM
Hello Wasim, if you make the "balance" a field in a table it can actually be a running total. Your current data entry form would require some simple VBA in the "After Update" event procedures of the fields Debit and Credit. This VBA would do exactly as you suggest and subtract debits and add credits to the Balance field which would be from a different table and on a "subform" on your current main form.
If you can post a zipped copy of your database on here, (less any data or with dummy data) we can show you how to do it.

wasim_sono
04-11-2006, 10:47 PM
Thanks for the reply.

I'm sending my db. please intimate me for the receipt of the file.

Regards.

Wasim

OBP
04-12-2006, 01:45 AM
wasim, I have some questions about the "Transaction" form, do the customers have more than one account?
If the answer is yes, do you want the "balance" on each account or an overall balance?

I also have some general recommendations about the form, would you like to know them?

wasim_sono
04-14-2006, 11:48 AM
Dear OSB

Yes! every customer may have more than one account. and the balance is not over all but each account.

I welcome any type of recommrndations.


Thanx.

Wasim

OBP
04-15-2006, 04:10 AM
Wasim, here is the database with the Balance subform.

wasim_sono
04-17-2006, 06:33 AM
Thank you very much dear OBP::bow:

But One thing that when by entering data press ENTER key at last field and then cursor goes off. and by clicking the first field by mouse cursor appear again. I think it is due to using subform.

Today I'm so busy so I can't give much time. sorry for that. As I free I will response u again bcaz I have more databses which I want to 'refurnish'. I hope you will never mind.

Take care. :yes


Regards.:thumb

Wasim

wasim_sono
04-18-2006, 06:41 AM
Dear OBP

I have attached a file for ur reference. In this file I want as the the batch no changed the Slip Id to be initialize and start again from 1.

The scnerio is that user need to count the number of record in a batch. and similarly when print a report based on batch no display the record no as sr. no.

Can u solve the problem.

I'll be highly appreciated.


Regards.


Wasim

OBP
04-18-2006, 08:38 AM
Wasim, I am not sure what you want to do or where and how you want to do it.
Is it on the Form?
In a query?

wasim_sono
04-19-2006, 05:14 AM
OBP

Actually the user need to count the no of records punched in a particular batch no. For this purpose I used a field as Slip ID which incremented by 1 as the end od record occure. but as the user (for example after some records say 150 records) change the batch no the Slip Id initialize to zero and then start from 1. In this manner I got the Serial no of records of a particular batch. and when printing the report it also show me that there are ( say 150 records) in that batch no on which report generated. I can solve this by using crsytal report but I want to solve it in ACCESS.

I think I explained thoroughly. but if need more then pl. intimate me.

Regards.

Wasim