I am trying to get a button to delete the current record using the command:
DoCmd.RunCommand acCmdDeleteRecord
but nothing happens when it runs. I am sure the code is running because I have set a msgbox to come up after it in the click event and it comes up.
If I use the button wizard to create the button it will delete a record, but that seems to break the "lost focus" code I use for the button.
Thank you.
(Access 2010)
DoCmd.RunCommand acCmdDeleteRecord
but nothing happens when it runs. I am sure the code is running because I have set a msgbox to come up after it in the click event and it comes up.
If I use the button wizard to create the button it will delete a record, but that seems to break the "lost focus" code I use for the button.
Thank you.
(Access 2010)