value of the last record

  • Thread starter Thread starter Dan
  • Start date Start date
D

Dan

Is it possible to set a text box to equal the last,
first, previous, #5, etc records.

What I am trying to do is have a text box on my form
display the last record, a previous record of the
selected record that are located on the linked subform.
 
I meant that I am trying to get a text box to equal the
value of the field [amount due] of the previous record
 
Do you want the text box to display the value of _a_ _single_ _field_
(perhaps the primary key) from a previous record? That is easy enough,
though you obviously need to preserve an "audit trail" if you want to
go back further than the immediately previous record. A text box
cannot easily display a whole _record_.

Is it possible to set a text box to equal the last,
first, previous, #5, etc records.

What I am trying to do is have a text box on my form
display the last record, a previous record of the
selected record that are located on the linked subform.


Please respond to the Newsgroup, so that others may benefit from the exchange.
Peter R. Fletcher
 
If you simply want the text box to show the value of the last record
saved, you can put code in the FormAfterUpdate event to take the
[amount due] and put it in the textbox. There are a few "gotchas" in
this, having to do with FormBeforeUpdate being called other than when
you go to a new record. You may also need to put code in the Current
event so that the textbox is not updated unless the current record has
changed. If you want to be able to display older values, you need to
maintain an "audit trail", which will be considerably more cmplex.

I meant that I am trying to get a text box to equal the
value of the field [amount due] of the previous record


Please respond to the Newsgroup, so that others may benefit from the exchange.
Peter R. Fletcher
 
Back
Top