-
DATAGRID Question
I have a form with a DataGrid ...
How can I fill it WITHOUT having to Use ADODC data controls or any other data control ...
I want to be able to create My own Connections..
and Recordset ... Like this...
Dim Conn as new ADODB.COnnection
Dim Rec as new ADODB.Recordset
Blablabla
Set DataGrid.SOMETHING = Rec
That Something is usually DataSource...
But it keeps giving me the following error "Recordset is not bookmarkable"
... I DONT GIVE A DAMN ABOUT IT BEEING BOOKMARKABLE OR NOT !!!
-
Hi
Try using a flexgrid or list box .....
You can fill either (flex seems better) with data from an ADODB connection :)
Regards
Vince
-
Dim Cn As ADODB.Connection
Dim Rs As ADODB.Recordset
Dim conex As String
Set Cn = New ADODB.Connection
conex = "Provider=Microsoft.jet.oledb.3.51; Data Source =" & App.Path & "\" & "mydatabase.mdb"
Cn.ConnectionString = conex
'This avoids the error: The rowset is not bookmarkable
Cn.CursorLocation = adUseClient
Cng.Open
Set Rs = Cn.Execute("mytable")
Set DataGrid1.DataSource = Rs