From your description, it sounds like you're trying to build some sort of running total. But looking at your code, it's not clear how you're doing that, nor what the problem is.
Google translate:Hello dear forum members, I have a concern that is related to updating my table.
Indeed I designed a vb.net application for the management of cash operations for the account
of a structure and everything works correctly until the level of the modification of the table where I have a problem.
The thing is that an operation is either a receipt or an expense from which I created a variable
balance = revenue - expenditure (revenue or expenditure is nil depending on the nature of the operation) which represents the balance
of each operation performed.
As for the part of the cash balance from an op2 operation, we have:
E: balance_caisse_op2 = balance_op2 + balance_caisse_op1 (equal to balance_op1) and it works well in insertion.
My problem is that on for example 10 operations carried out we decide to modify the 5th operation,
how to readjust cash register balance from changed row to last item in table
cash_balance, since the different lines are dependent for the calculation of the different balances
of the body according to equation E.
I have already thought of a solution but that gives me a FatalError. I actually did the following:
In summary, the GetMaxId() method when called returns the id_max of the operation table and this value will be used
stop condition in the loop.
Then the GetBalanceCaisse() method, for its part, calculates the balance of the cashbox during a given operation.
Finally, the UpdateBalance() method which will be called just after the one which will modify the line
concerned, we recalculate the balance of the cash register from the modified line to the last element of the column
because all related. The for loop defines the start and end of changes.
I am counting on everyone to resolve this difficulty. Thanks…
Start by describing your table structure and providing some sample data. Then explain what you're updating, and what you want to happen when you update it.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."