Although the record-count of the mshflexgrid is correct, only the first 2048 records are displayed. If you need to display more than 2048, you need to open the recordset and populate the grid using the GetString method of ADO and the Clip property of the MSHFlexGrid.
The code below can be used in place of the code in the Command1_Click event in the
Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim rsVar As Variant
Dim i As Integer
cn.Open "Testing" '<-- Your DSN
rs.Open "select * from Cies", cn, adOpenStatic, adLockOptimistic
rs.MoveLast
rs.MoveFirst
' Assuming that rs is your ADO recordset
MSHFlexGrid1.Rows = rs.RecordCount + 1
rsVar = rs.GetString(adClipString, rs.RecordCount)
MSHFlexGrid1.Cols = rs.Fields.Count
' Set column names in the grid
For i = 0 To rs.Fields.Count - 1
MSHFlexGrid1.TextMatrix(0, i) = rs.Fields(i).Name
Next
MSHFlexGrid1.Row = 1
MSHFlexGrid1.Col = 0
' Set range of cells in the grid
MSHFlexGrid1.RowSel = MSHFlexGrid1.Rows - 1
MSHFlexGrid1.ColSel = MSHFlexGrid1.Cols - 1
MSHFlexGrid1.Clip = rsVar
' Reset the grid's selected range of cells
MSHFlexGrid1.RowSel = MSHFlexGrid1.Row
MSHFlexGrid1.ColSel = MSHFlexGrid1.Col
rs.Close
Set rs = Nothing
cn.Close
Set cn = Nothing