Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: VB6
Expertise: beginner
Sep 2, 2000

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.SelectedItem
End Sub
Marco Bellinaso
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.