Hi guys
In the following code, only rs.fields(0) value gets displays and all other values don't appear in the listbox.Its a single column listbox.
ANy idea why?
In the following code, only rs.fields(0) value gets displays and all other values don't appear in the listbox.Its a single column listbox.
ANy idea why?
Code:
Private Sub Command0_Click()
ShowUserRosterMultipleUsers
End Sub
Sub ShowUserRosterMultipleUsers()
Dim cn As New ADODB.Connection
Dim cn2 As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim i, j As Long
cn.Provider = "Microsoft.Jet.OLEDB.4.0"
cn.Open "Data Source=J:\a.mdb"
Set rs = cn.OpenSchema(adSchemaProviderSpecific, _
, "{947bb102-5d43-11d1-bdbf-00c04fb92675}")
'Output the list of all users in the current database.
' Debug.Print rs.Fields(0).Name, "", rs.Fields(1).Name, _
"", rs.Fields(2).Name, rs.Fields(3).Name
While Not rs.EOF
Me.List1.AddItem rs.Fields(0) & " " & rs.Fields(1) & " " & rs.Fields(2) & " " & rs.Fields(3)
rs.MoveNext
Wend
End Sub