Hello everyone,
I am pretty new in Access programming and creating a forms, reports, etc.
I have a problem with a delete process on my form.
I have set a delete button on my main form, but for some reason when I start operation, the record won't deleted in the main table and other child tables which implement fields in subforms.
I tried this code:
Private Sub deletebutton_Click()On Error GoTo Err_deletebutton_Click
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdDeleteRecord
Exit_deletebutton_Click:
Exit Sub
Err_deletebutton_Click:
MsgBox Err.Description
Resume Exit_deletebutton_Click
End Sub
... But it still doesn't work, just blank all fields of form and subforms.
Also, I have a Listbox which display record and on which I could navigate, but I couldn't delete record (on right click on specific record). It seems to be forbidden. I would like if someone know how to "unlock" it, that I could have alternative solution for deleting complete record.
Thanks for your answer!