VB updates in form field not updated in tables

P

Peter Morel

I encounter some new problems with my application. There are two table:
proposal ad proposal details. I have a form showing the details of the
proposal and a subform with the proposal details in list form.
When updating the volume of one record, I update the total sales field using
a field after update VB script. A first challenge is to find a way to force
the update of the underlying table without using the Refresh or recalc
mothod. Using these methods makes the current record jump to the first
record. Not acceptable as user experience.
Next step is that I in the same after update script query the table of the
proposal details to calculate the sum of the proposal and to update the total
value of the proposal itself.
As the record in the underlying table is not updated the total sum is not
correct but shown the old value.
When moving to another detailed record in the form, I assume that the record
in the underlying table should be updated. But looking at the record in the
table, I noticed that it is not updated. Executing a refresh on the form (F5)
does not change anything. It seems that the table and the form are not in
sync any more.
Any comment, suggestion or question that can push me into the right
direction is very welcome.
 
J

Jeanette Cunningham

Usually, there is no need to save the total sales in a table.
The total sales can be calculated using a query any time you need to know
the total sales.
If you wanted to save the total sales in a table, you would use an update
query in the form's after update event.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top