devxlogo

Changing the current record using bookmarks

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

devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist