Hi how do i populate a datagrid control or a list view control with records from an access database? the book i am using is not covering it, is there a site out there that can help??
Printable View
Hi how do i populate a datagrid control or a list view control with records from an access database? the book i am using is not covering it, is there a site out there that can help??
DAO Method
Dim N As Integer
Dim DB As Database
Dim RS As Recordset
Set DB = OpenDatabase("DatabaseName")
Set RS = DB.OpenRecordset("TableName",dbWhatever)
Do Until RS.EOF
N = N + 1
ListView1.ListItems.Add N,,RS![FieldName]
ListView1.ListItems(N).SubItems(1) =
RS![FieldName]
(Add More subItems if needed)
RS.MoveNext
Loop
thank u for that snippet:)))