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.

The following steps show how to use the DataNavigator control in the Designer. (You must have already added the data controls to the Toolbox.)

To navigate a recordset with the DataNavigator control

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

  2. Use a DataBinder 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. To associate the recordset from the DataSource control with the DataNavigator control, set the DataNavigator controlÆs the dataSource property. From the drop-down list, select 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.