First of all, a couple of questions. Does your table have a key? If it does, is the key data shown in the grid? If it is, then deleting the row is easy with code like this from one of my programs:. You would have to change it to match your database and table of course, and substitute the data in the grid that represents the table's key for sSysName.Code:SQL = "DELETE FROM SavedSystems WHERE SystemName = " & "'" & sSysName & "'"
gdbRWTU.Execute SQL, dbFailOnError
Another question is why do you display the text? Why not delete the data depending on a row in the grid that the user clicks?
Finally, there is a small problem in your code to display the text. You wind up with "--" at the beginning of the string. One way to avoid that would be to modify your loop like this.------------------Code:For intI = 0 To MSFlexGrid1.Cols - 1
MSFlexGrid1.Col = intI
If intI > 0 Then
strTemp = strTemp & "--" & MSFlexGrid1.Text
Else
strTemp = MSFlexGrid1.Text
End If
Next intI
Marty
COGITO EGGO SUM
I think; therefore I am a waffle.
