I've a formA with a field "total" and a formB based on the results of a query where the users can insert N parameters (for each of them the fields are ParameterName; Quantity; Price; TotalPrice(=Quantity*Price) ) and there's a field TotalB =sum of TotalPrice of the parameters.
Each time a user inserts a new parameter, the TotalB is updated and passed to the formA (Forms!formA!total=me.TotalB).
The same happens when I delete a parameter and it works.
The problem is when I delete the last one and formB is empty 'cause the formA!total doesn't change.
I tried to create an hidden-field to memorize the value I'm goin' to delete: so when I want to delete a parameter, it copies the TotalPrice in this hidden-field, deletes the parameter and formA!total=formA!total-hiddenfield.
Again it works except when I delete the last one (but I can see the hiddenfield contains the value it should contain). So i think the problem is in the formA!total
The strangest thing is that I created a DeleteAll button and the code I wrote is Forms!formA!total=0 but the field doesn't change
Each time a user inserts a new parameter, the TotalB is updated and passed to the formA (Forms!formA!total=me.TotalB).
The same happens when I delete a parameter and it works.
The problem is when I delete the last one and formB is empty 'cause the formA!total doesn't change.
I tried to create an hidden-field to memorize the value I'm goin' to delete: so when I want to delete a parameter, it copies the TotalPrice in this hidden-field, deletes the parameter and formA!total=formA!total-hiddenfield.
Again it works except when I delete the last one (but I can see the hiddenfield contains the value it should contain). So i think the problem is in the formA!total
The strangest thing is that I created a DeleteAll button and the code I wrote is Forms!formA!total=0 but the field doesn't change