C
Craig Buchanan
I would like to bind a disconnected ADODB (v2.7) recordset to a listbox's
recordset property. For some reason, the values aren't being displayed.
here's the form's coding:
....
'i create the recordset
Set m_TableDefinition = New ADODB.Recordset
With m_TableDefinition
.CursorLocation = adUseClient
.Fields.Append "Location", adVarChar, 50
.Fields.Append "Name", adVarChar, 255
.Fields.Append "Alias", adVarChar, 255
.Fields.Append "DLL", adVarChar, 50
.Fields.Append "DSN", adVarChar, 50
.Fields.Append "UserId", adVarChar, 50
.Open
End With
....
set rs = myobject.Recordset
'rs has rows
debug.print rs.recorcount
Me.lstTables.RowSourceType = "Table/Query"
Set Me.lstTables.Recordset = rs
what am i missing? i've tried rs.movefirst for the set me.lsttables line to
no effect.
thanks,
craig buchanan
recordset property. For some reason, the values aren't being displayed.
here's the form's coding:
....
'i create the recordset
Set m_TableDefinition = New ADODB.Recordset
With m_TableDefinition
.CursorLocation = adUseClient
.Fields.Append "Location", adVarChar, 50
.Fields.Append "Name", adVarChar, 255
.Fields.Append "Alias", adVarChar, 255
.Fields.Append "DLL", adVarChar, 50
.Fields.Append "DSN", adVarChar, 50
.Fields.Append "UserId", adVarChar, 50
.Open
End With
....
set rs = myobject.Recordset
'rs has rows
debug.print rs.recorcount
Me.lstTables.RowSourceType = "Table/Query"
Set Me.lstTables.Recordset = rs
what am i missing? i've tried rs.movefirst for the set me.lsttables line to
no effect.
thanks,
craig buchanan