Btw.: would there be another possibility to determine at which record the cursor of the grid is actually pointing?
As I have yet found none, that's how I work around usually, provided my table has an index key field with a unique number (what most tables should have anyway).
I write the SELECT so that the Key field is th first one in the recordset.
When setting the FlexGrid, the key goes to column 0. We can set column 0 width to zero, so we don't see the key value.
When wanting to know the key of the current record where the cursor is on I do:
Code:
  CurrentKey = Val(flx.TextMatrix(flx.Row, 0))
To delete this current record you can then simply:
Code:
  DBConn.Execute "DELETE FROM myTable WHERE [KeyField]=" & CurrentKey
Also a reference to the Recordset should be kept in a variable when the flex is loaded in the first place like
Code:
  Private rsList as ADODB.Recordset
  ...
  rsList.Open SQLstring, DBConn, adOpenStatic, adLockReadOnly
  set flxList.DataSource = rsList
So to refresh the list you can now do a rsList.ReQuery and Set flxList.DataSource = rsList