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

Update table with form data

Status
Not open for further replies.

terryvanduzee

Technical User
Aug 3, 2006
4
US
Hello
I have a form (Access 2003) that updates based on a calculation in the form. What I am trying to do is to update a table value (insert a record for the current form information, including the calculated field). Ex: I have a field that calculates a running balance. In my table I have a balance field.)

Now, what happens is I have a "Next" button that takes the user to a new record, and the balance value shows up properly. But if I close the form and reopen it, the value for balance always shows up as blank (new record). I need to be able to display the value from the table where the ID number is max and offset the record by -1 (the last value before the new record). I tried DMAX but could not find a way to do DMAX -1.

The table's ID field is an autonumber so the last record will always be the max.

Any help would be appreciated.

Thank you

Terry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top