Here is some code (without much comments) for you to see how to access cells of the flexgrid ... help it helps!
Private Function LOADflxRESULTS() As Long
Dim iNCol As Integer, iNRow As Integer 'Number of Col and Rows in rst
Dim iC As Integer, iR As Integer 'Col and Row counters
LOADflxRESULTS = 0 'INIT function RETURN
[AppProcs].OpenCNN cnn
rst.Open sSQL, cnn, adOpenStatic, adLockReadOnly, adCmdText
If rst.EOF And rst.BOF Then
flxR.Rows = 0:: flxR.Cols = 0:: flxR.Clear 'Wipe out grid
lblResultCount.Visible = True
lblResultCount.Caption = "(No records matched search criteria)"
GoTo LOADflxRESULTS_CloseOut
End If
rst.MoveLast:: rst.MoveFirst
lblResultCount.Visible = True
LOADflxRESULTS = rst.RecordCount
lblResultCount.Caption = "(" & rst.RecordCount & " records matched search criteria)"
'can't close either the rst or the cnn here since rst not truly declared as a disconnected
'recordset.
iNCol = rst.Fields.Count
iNRow = rst.RecordCount
flxR.Cols = iNCol:: flxR.Rows = iNRow + 1 'define grid size
flxR.FixedCols = 1:: flxR.FixedRows = 1 'establish grey col and row
rst.MoveFirst
For iC = 0 To iNCol - 1 'Label Col Headings
flxR.TextMatrix(0, iC) = rst.Fields(iC).Name
Next iC
For iR = 1 To iNRow
For iC = 0 To iNCol - 1
If IsNull(rst.Fields(iC).Value) Then
flxR.TextMatrix(iR, iC) = ""
Else
flxR.TextMatrix(iR, iC) = rst.Fields(iC).Value
End If
Next iC
rst.MoveNext
Next iR
LOADflxRESULTS_CloseOut:
rst.Close
cnn.Close
End Function '(LOADflxRESULTS)