Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update calculated txtbox for testing before close

Status
Not open for further replies.

MushMouse

Programmer
Mar 29, 2004
65
US
I have 2 txtboxes on a form : DolAmt & TotDolAmt.
Dolamt is user entered, TotDolAmt = Sum(DolAmt).
I would like to test that TotDolAmt has a certain value before closing the form.
My problem is that TotDolAmt is not being recalculated to include the value of the record that was most recent.
I have to move to another record or close then reopen the form in order for it to work.
I tried Me.Recalc, but it didn't work.
I tried
DoCmd.RunCommand acCmdSaveRecord
Me.TotDolAmt.Requery
before DoCmd.Close but it didn't work.
Any suggestions would be most welcome!!
Thanks!
 
Hi
Maybe:
Code:
Private Sub DolAmt_AfterUpdate()
Me.Recalc
End Sub
 
Thanks. I tried it, but it didn't work. I redid my design and now it's working. Thanks again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top