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

Update Account Balance on Form

Status
Not open for further replies.

TammyT

Programmer
Sep 17, 2003
183
US
Okay - form is based on a table & sub-table. Main table has the account starting & current balances. Sub table has the update records. Main table is for funding sources that have money coming in & going out, so I created the sub-table to record the transactions.

I did an auto-form, so that Access would create a form using the main & sub-tables - did so fine. Now, here is where I'm stuck: getting Access to do the math!

Okay: I'm thinking the VBA (or would a macro be easier?) needs to go on the On Exit event of the sub (child) form. I'm just lost on what the code would be - never done one like this before! Would I actually use code, or do I create an Update query to run on exit? I know it needs to take the Update Amount field & add it to the Current Balance, to get the new Current Balance amount.

Help? Thanks!
 
It is not usual to store calculations in tables. You can use Sum in the footer of the subform to get the balance. You an refer to this control on the main form. Have a look at the Orders form in the Northwind sample database.
 
There must be a way to do a calculation & then store the result - that's really all I need to do.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top