Select Record Not Available in Delete

J

Jim Shaw

BlankWhy is the Select Record function not available?

In my form, I'm at the record I wish to delete when I click on the cmdDelete
control button.
(The form has a tab control with multiple tabs containing subforms, if that
is helpful)
The underlying data for the main form is a simple query of the data table
with no joins, etc.
The Delete command generates an error message that the "Select Record"
function is not available.
The trace shows that the first "DoCmd" below generates the message.

Private Sub cmdDelete_Click()
On Error GoTo Err_cmdDelete_Click
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70 'Select Record
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
Exit_cmdDelete_Click:
Exit Sub
Err_cmdDelete_Click:
MsgBox Err.Description
Resume Exit_cmdDelete_Click
End Sub

Thanks
Jim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top