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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculated Field in continous subform

Status
Not open for further replies.

nhtraven

Technical User
Dec 10, 2000
114
US
Hi all

I have a form that has a continous subform in it. I want to have a subform that will give a running total of sorts. What database is for is keeping payment information, i want this form to show the beginning balance and ending balance after all adjustments are entered. Saving the ending balance in each row of the continous form. I cannot figure out how to accomplish this and save ending total in the table. my current subform setup is :

Current Payment Beginning Balance New Balance
99999.99 999999.99 99999999.99
this is entered Calcualated calculated

I have this code in the after update of new balance:

Private Sub NewBalance_AfterUpdate()
Dim db As Database


Set db = CurrentDb()
db.Execute "INSERT INTO tblPayment (EndingBalance) Values (" & NewData & ");"
Set db = Nothing



End Sub

THat works. It sends the new balance total to the table.
formula for Beginning balance control source : =Sum([BeginBalance]+[EndingBalance])
the formula in new balance control source : =Sum(([BeginBalance]+[CurrentBill])-[CurrentPay])

But the form doesnt total new balance correctly. ANy help would be appreciated

Thanks
Raven
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top