Long delay in posting result to form

  • Thread starter Thread starter Bob Richardson
  • Start date Start date
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?
 
Maybe issue a refresh or repaint on the control??

txtTotalCost.requery
 
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
 

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

Back
Top