Topic: total pric prblm

I have a problem, please, which is the sum of prices does not appear automatically in the textbox even after pressing the Save button (when pressing the Save button, the form does not close and the total prices appear in the textbox) as shown in the attached screenshot of the file

Post's attachments

Attachment icon MDM.zip 404.29 kb, 222 downloads since 2021-09-10 

Re: total pric prblm

Try doing it like this (see attached).
You are doing other things with your edit fields on the client form that I don't understand so I have used new edit fields to show how to diisplay the total from the grid and the result of the total - versement.  But at least you can see how it can be done.
Derek.

Post's attachments

Attachment icon MDM.zip 379.52 kb, 222 downloads since 2021-09-10 

Re: total pric prblm

Thank you very much, but when you press the save button, do not close the form until you press three times

Re: total pric prblm

Many Buttons on your Form1 are configured to show records from TableGrid1.
Check all the buttons on Form1 and other form and leave only one on Form1 with the Show Record function.
Copying a button produces unwanted results.
A few more questions and your program will work. )

Re: total pric prblm

Pressing the 'save' button 3 times has always been an issue - it was not something introduced by the fix in my last attachment.
You have 4 tablegrids on Form1 (2 that are hidden in a group box!).  They all do exactly the same thing so why have them?  This is precisely the reason why you need to press 'save' multiple times.
I have also fixed the problem you had with the client.total calculated field - you cannot reference another calculated field.
The script that calculates the total in commande.edit3.value is not correct.
It's not clear why you have a many:many relationship between the 'client' and the 'commande' tables;  I would have thought the relationship should only be on the 'commande' table.
Derek.

Post's attachments

Attachment icon MDM3.zip 378.06 kb, 249 downloads since 2021-09-10 

Re: total pric prblm

Thank you very much, The problem has been resolved

Re: total pric prblm

Cher Darek, j'ai posté un problème, pouvez-vous me donner la solution s'il vous plaît