We help IT Professionals succeed at work.

Me.refresh blinking form.

Tony
Tony asked
Hi,

I have a subform in Ms-Access, with the following information:

Product ID, Description,  Quantity,  Price, Total (Calculated field).

At the bottom of the form I have a Grand Total calculation.

However, when I change the Quantity, the Grand Total is not updating one time.  It is when I press enter(s) until a new record that the Grand Total is updated.

I know that "me.refresh" or "cmdruncommand accmdrefresh" after update (event) Quantity could be a solution.
However, if if use the "Refresh command", the form blinks and it does not look professional (at least for my point of view) when a user types information and the blinking blinking appears.

Is there any other way of getting the Grand Total updated, avoiding the blinking?

Thank you,
Comment
Watch Question

Jim Dettman (EE MVE)President / Owner
Most Valuable Expert 2017
Most Valuable Expert 2012

Just requery the Grand Total control alone:


 Me.<myControlName>.Requery


Jim.      

Author

Commented:
Me.<myControlName>.Requery   after updated event on Quantity :   did not work.

I tried this:
Me.SubtotalPieS.Requery
Me.InvoiceSDiscTT.Requery
Me.SalesTaxPieS.Requery
Me.TotalDueS.Requery       (This is the Grand Total calculated field).

not working...

Any other suggestion?
Jim Dettman (EE MVE)President / Owner
Most Valuable Expert 2017
Most Valuable Expert 2012

Is TotalDueS a calculated control or bound to a calculated field in the forms recordsource?


Jim.

Author

Commented:
This is the formula in the "TotalDueS" field:  =(Sum([SProductQty]*[SPriceCase])).

Where "SProductQty" and "SPriceCase" is in the Detail section of the Subform.

TotalDueS is in the FormFooter section.
President / Owner
Most Valuable Expert 2017
Most Valuable Expert 2012

If I'm understanding correctly, the issue is that the record hasn't been saved as yet, so the total is not reflected in the footer with the =Sum()


I would just force a save of the record on the AfterUpdate of qty and price:


 If Me.Dirty = True then Me.Dirty = False


 The total should then update on it's own.


Jim.

Author

Commented:
Yes, It worked.  Thank you very much!!!