Код заполнения:
- Код: Выделить всё
Private Sub Command1_Click()
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Set cn = New ADODB.Connection
Set rs = New ADODB.Recordset
With cn
.Provider = "Microsoft.Jet.OLEDB.4.0"
.ConnectionString = App.Path & "\db2.mdb"
.Open
End With
With rs
.ActiveConnection = cn
.CursorType = adOpenKeyset
.CursorLocation = adUseClient
.LockType = adLockOptimistic
.Source = "SELECT * FROM таблица1"
.Open
End With
Set DataGrid1.DataSource = rs.DataSource
Form1.MSFlexGrid1.DataSource = rs
End Sub
Ну и сам проект на всякий случай: