Cannot list data field in a form from a previous record

P

Paul

When I navigate from record to record in form view, I want a textbox/field of
the current record to display the data in a field from the previous record
immediately before it.

How do I perform this function in VBA or in expression builder?
 
T

Tom

Easiest solution is to use a continuous form but I guees that is not what
you are looking for.

Alternatively, you can use the following code where Name is the field value
you want to copy to the next record. Text2 is an unbound text field that
will display the value.

Dim txtCurrentName As String
Dim txtLastName As String

Private Sub Form_Current()
txtCurrentName = Nz(Me!Name, "")
Text2 = txtLastName
txtLastName = txtCurrentName
End Sub

Hope this helps.
 
Top