I am using a command button to delete current record. In production version, no menu will be availble.
If I am on the record in my form, use the "edit" menu diretly and delete it works, so does clicking "no" on the subsequent warning messge.
In my coded version (see end), if I click "no" on the warning message box, I get a "run time error3021 no current record". Here is my code:
----------------------
Private Sub Command38_Click()
'What: delete current record on form
'
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdDeleteRecord
DoCmd.Requery
End Sub
-----------------------------
thanks in advance.