Changing the current record using bookmarks

If you try to use a DataList and some labels or text boxes linked to an ADO Data control, and you click on some items in the list, you’ll notice that the data in the labels won’t change, because the current record isn’t changed.

To have the code work correctly, you have to write code in the Click event of the DataList that sets the current record in the Data control to the selected item in the list:

Private Sub DataList1_Click()    datPrimaryRS.Recordset.Bookmark = DataList1.SelectedItemEnd Sub

Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

Recent Articles: