Long delay in posting result to form

B

Bob Richardson

I have some simple VB coding to handle some arithmetic. When the user click
an option, the VB either adds or subtracts the cost of the item (depending
on true or false) to the total cost field. I also subtract from this the
credit balance to arrive at Amount Due, which is put in another field.

The Total Cost field updates immediately, while the Amount Due doesn't
reflect the changes until a mouse over of that field!!! I change both the
Total Cost and the Amount Due in the same subroutine. What do I need to do
to have the Amount Due field update at the same time as the Total Cost?
 
B

Bob Richardson

I tried requery, repaint, and refresh, but none would even compile. (e.g.
Me.Donated.Requery) Here's my sub. When the user clicks the Lunch Y/N field
on the form, the AmountDue text box is immediatedly updated. The Donated
text box doesn't get updated until I mouseover it's LABEL !!!

Private Sub Lunch_Click()
If Nz(Me.AmountDue, 0) Then
If Lunch = No Then
Me.AmountDue = Me.AmountDue - LunchCost
Else
Me.AmountDue = Me.AmountDue + LunchCost
End If
End If
Me.Donated = Me.Paid - Me.AmountDue
End Sub
 
Top