M
mattyboy150279
Hi.
Im using the ListView control in Access. The control lists a series of
tables within a selected database. When I double click on the listview
I want it to populate a separate listview with all the information in
that table in listview format.
The code I have below doesnt work. The problem I get is on the "Setrs
= ...." bit. Where am I going wrong?
My code is below:-
Private Sub lvwTables_DblClick()
Dim i
Pag2.SetFocus
Dim oItem As ListItem
Set oItem = lvwTables.SelectedItem
Set rs = db.OpenRecordset(oItem)
For Each i In rs.Fields
lvwTables.columns.Add (i.Name)
Next
End Sub
Im using the ListView control in Access. The control lists a series of
tables within a selected database. When I double click on the listview
I want it to populate a separate listview with all the information in
that table in listview format.
The code I have below doesnt work. The problem I get is on the "Setrs
= ...." bit. Where am I going wrong?
My code is below:-
Private Sub lvwTables_DblClick()
Dim i
Pag2.SetFocus
Dim oItem As ListItem
Set oItem = lvwTables.SelectedItem
Set rs = db.OpenRecordset(oItem)
For Each i In rs.Fields
lvwTables.columns.Add (i.Name)
Next
End Sub