This is the code I use to put in the field names as column headings


.........
Dim SColName As String
Dim iCol As Integer
...
...
...
With rs
grdData.Cols = .Fields.Count
grdData.Row = 0
For iCol = 0 To .Fields.Count - 1
SColName = .Fields(iCol).Name
grdData.Col = iCol
grdData.Text = SColName
Next
End With
...
...

Where rs is a recordset passed to the module byRef and grdData is my flexigrid passed to the module also byRef