He Scuzy,

Converting a database-driven recordset to a custom recordset (see http://forums.vb-world.net/showthrea...threadid=15424 ) and then assign it to a DataGrid, seems like a waste of resources to me, so here's the code for a datadriven example. Change the connection string to suit your needs: Access, SQL whatever:

Dim cnnAccessLogDatabase As ADODB.Connection
Set cnnAccessLogDatabase = New ADODB.Connection
Dim rsUser As ADODB.Recordset
Set rsUser = New ADODB.Recordset
Dim sSQL As String
Dim sConnectionString As String
sConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Password="""";Data Source=" & App.Path & "\" & "aDatabase.mdb;Persist Security Info=True"
If Not sConnectionString = "" Then
cnnAccessLogDatabase.Open sConnectionString
rsUser.CursorLocation = adUseClient
sSQL = "SELECT Name, Street FROM aTable WHERE ID = " & ID
rsUser.Open sSQL, cnnAccessLogDatabase, adOpenForwardOnly, adLockBatchOptimistic
End If
Set DataGrid1.DataSource = rsUser


Imar