Hello how do i delete a row with DAO ?
i allway's get a error with this :
any idea why ?
Private Sub mnudel_Click()
On Error GoTo 1:
RS.Edit
RS.Delete
db.Recordsets.Refresh
DbRefreshTextBox
DbRefreshTextBox
Exit Sub
1:
MsgBox Err.Description
Printable View
Hello how do i delete a row with DAO ?
i allway's get a error with this :
any idea why ?
Private Sub mnudel_Click()
On Error GoTo 1:
RS.Edit
RS.Delete
db.Recordsets.Refresh
DbRefreshTextBox
DbRefreshTextBox
Exit Sub
1:
MsgBox Err.Description
Hello Zulander
I don't know what the error is but it is better to use this line:
if RS.RecordCount <> 0 then RS.Delete
You don't need: RS.Edit
Nice regards,
Michelle.
RS.delete
RS.update
Don't use the rs.edit as Michelle mentioned & I think I'm right in putting the update instead of Refresh