Share via


Visual Basic: RDO Data Control

BOFAction, EOFAction Properties (Remote Data)

See Also    Example    Applies To

Returns or sets a value indicating what action the RemoteData control takes when the BOF or EOF property is True.

Syntax

object**.BOFAction** [= value]

object**.EOFAction** [= value]

The BOFAction and EOFAction property syntaxes have these parts:

Part Description
object An object expression that evaluates to an object in the Applies To list.
value A constant or value that specifies an action, as described in Settings.

Settings

For the BOFAction property, the settings for value are:

Constant Value Description
rdMoveFirst 0 MoveFirst (Default): Keeps the first row as the current row.
rdBOF 1 BOF: Moving past the beginning of an rdoResultset triggers the RemoteData control's Validate event on the first row, followed by a Reposition event on the invalid (BOF) row. At this point, the Move Previous button on the RemoteData control is disabled.

For the EOFAction property, the settings for value are:

Constant Value Description
rdMoveLast 0 MoveLast (Default): Keeps the last row as the current row.
rdEOF 1 EOF: Moving past the end of an rdoResultset triggers the RemoteData control's Validation event on the last row, followed by a Reposition event on the invalid (EOF) row. At this point, the Move Next button on the RemoteData control is disabled.
rdAddNew 2 AddNew: Moving past the last row triggers the RemoteData control's Validation event to occur on the current row, followed by an automatic AddNew, followed by a Reposition event on the new row.

Remarks

If you set the EOFAction property****to rdAddNew, once the user moves the current row pointer to EOF using the RemoteData control, the current row is positioned to a new row in the copy buffer. At this point you can edit the newly added row. If you make changes to the new row and the user subsequently moves the current row pointer using the RemoteData control, the row is automatically appended to the rdoResultset. If you don't make changes to this new row, and reposition the current row to another row, the new row is discarded. If you use the RemoteData control to position to another row while it is positioned over this new row, another new row is created.

When you use code to manipulate rdoResultset objects created with the RemoteData control, the EOFAction property has no effect it only takes effect when manipulating the RemoteData control with the mouse.

In situations where the RemoteData control rdoResultset is returned with no rows, or after the last row has been deleted, using the rdAddNew option for the EOFAction property greatly simplifies your code because a new row can always be edited as the current row.