Click here to Skip to main content
14,328,470 members
Rate this:
Please Sign up or sign in to vote.
See more:
I have 2 tables.
one table is customers.
it has 3 fields. acc_number , name , sum
second table is transactions
it has transaction_id, transaction_amount, acc_number

and i have form which have all fields included.
How can i update customers.sum field when i add new transaction on form.
for example

acc_number name sum
1001 Sven 1000


i do one transaction with amount of 500
i want to update field sum to 1500

Thank you for answer
Posted

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

Hie!

May be these one help you...


Do one thing when you save the record in transaction table after that line you can take one variable as integer and you have to fetch last record of SUM by account number field from customer Table and now add last transaction amount + last sum amount in that new variable. and update query for sum field in customer table by account number.


If you still not nderstand send me your code i will give to answer with coding Okay.....
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100