Hello,
I have the following code behind a delete button in a Form:
MySQL = "select * from Mytable where (MyTable.Cod = " & Me!txtCod & ""
Set Myrs = MyDB.OpenRecordset(MySQL , DB_OPEN_DYNASET)
If Myrs.recordcount > 0 Then
Myrs.Delete
MsgBox "Register deleted successfully"
End If
My problem is that is does show the msgbox, but it does not delete the row in the table MyTable.
Many thanks,
im
I have the following code behind a delete button in a Form:
MySQL = "select * from Mytable where (MyTable.Cod = " & Me!txtCod & ""
Set Myrs = MyDB.OpenRecordset(MySQL , DB_OPEN_DYNASET)
If Myrs.recordcount > 0 Then
Myrs.Delete
MsgBox "Register deleted successfully"
End If
My problem is that is does show the msgbox, but it does not delete the row in the table MyTable.
Many thanks,
im