Navigating Records

The DataNavigator control allows you to change the current record in a recordset. Use the DataNavigator control in conjunction with another data-bound control, such as the DataBinder control. The DataBinder control binds a property of another control to a field in a recordset. This property obtains data from the recordset’s current record, which is initially the first record. To move to another record, use a DataNavigator control that is bound to the same recordset.

To navigate a recordset with the DataNavigator control

  1. Add a DataSource control to your form to retrieve the data. For information on how to do this, see Retrieving a Set of Records.

  2. Use a DataBinder control and an Edit control to bind data from the recordset associated with the DataSource control. For information on how to do this, see Binding Data with the DataBinder Control.

  3. Add a DataNavigator control to the form.

  4. Set the DataNavigator control’s dataSource property to the name of the DataSource control.

  5. Use the buttons on the DataNavigator control to navigate the data:
    Button Navigation Direction
    << Move to the first record.
    < Move to the previous record.
    > Move to the next record.
    >> Move to the last record.

For information about using the DataNavigator control in code, see the DataNavigator Control reference topic.