| Author: Kundan Kumar Sinha 22 Aug 2008 | Member Level: Gold | Rating: Points: 6 |
Hi,
Create a connection string for the Access Database.
Open Connection with that database, declare recordset and execute Select statment,
like,
rs.Open "Select * From TableName", Conn 'Where Conn is active connection
Now add the folowing code
Dim i As Long, j As Long msflexgrid1.visible = false msflexgrid1.Cols = rs.Field.Count msflexgrid1.Rows = rs.RecordCount + 1 Do While Not rs.EOF i = i + 1 'ignore fixed row For j = 1 To 10 'ignore fixed column msflexgrid1.TextMatrix(i, j) = rs.Fields(j) Next rs.MoveNext Loop msflexgrid.visible = true
Regards, Kundan
|