Hello,

I have an application that links to a database. On one particular form i have an ADODC object that liks via an ODBC DSN to one particular table in my database. I also have a Datalist object on the form.

What I want to be able to do is when the user clicks on the datalist, whichever record they clicked on becomes the current record in the recordset of the ADODC control - just as if we had done "movenext" a couple of times.

The code i tried is this:

Private Sub DatList_Click()

My_Adodc.Recordset.Bookmark = DatList.SelectedItem

End Sub

but when i run it i get this message:

Runtime error: -2147217887 (80040e21)
Method 'Bookmark' of object '_Recordset' failed


Any help would be greatly appreciated.

Thanks