Reposition Event
Object List Next Object
Defined By: Recordset
Description:
The Reposition event is triggered once a record becomes current, allowing you
to program specific actions to occur at this time.
Usage:
Sub Reposition()
Details:
A new record becomes current after the user presses one of the DataControl's
movement buttons, or your program code executes a Move or Find method. The
Reposition event lets you react to data in a record immediately after the record is
made current. The Reposition event occurs after the new record becomes current.
For example, you may want to perform calculations or update a form based on
the new record's data.
Several actions can cause the Reposition event. The Reposition event is
triggered when:
a DataControl loads (making the first record in the RecordSet current),
a user clicks a button on the DataControl
a user moves between records
any of the Move or Find methods are executed in code.
The Validate event is similar to Reposition in that it occurs right before a record becomes current. In the example below, the values of data in two
textboxes (TextBox1 and TextBox2) are added together and the results put into a
Label control. The Label control may be linked to a DataControl.
Sub RecordSet_Reposition()
Label1.Text = TextBox1.Text + TextBox2.Text
End Sub
See Also:
FindFirst, FindLast, FindNext, FindPrev methods; Validate event ; MoveFirst, MoveLast, MoveNext, MovePrev methods