S
Stuart Grant
I have a form which displays details of each record in text boxes. It has
New, Print and Quit buttons all of which work fine. I added a delete
button with the Button Wizard and made its action Delete Record.
The wizard added this sub
Private Sub cmdDelete_Click()
On Error GoTo Err_cmdDelete_Click
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
Exit_cmdDelete_Click:
Exit Sub
Err_cmdDelete_Click:
MsgBox Err.Description
Resume Exit_cmdDelete_Click
End Sub
When I try to use it, i.e click on the button, after selecting a record, I
get the error message "The command or action "Select Record" isn't available
now", which doesn't make sense to me. The sub goes straight from the first
DoCmd line to the error.
Anybody know what's wrong ?
Stuart
New, Print and Quit buttons all of which work fine. I added a delete
button with the Button Wizard and made its action Delete Record.
The wizard added this sub
Private Sub cmdDelete_Click()
On Error GoTo Err_cmdDelete_Click
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
Exit_cmdDelete_Click:
Exit Sub
Err_cmdDelete_Click:
MsgBox Err.Description
Resume Exit_cmdDelete_Click
End Sub
When I try to use it, i.e click on the button, after selecting a record, I
get the error message "The command or action "Select Record" isn't available
now", which doesn't make sense to me. The sub goes straight from the first
DoCmd line to the error.
Anybody know what's wrong ?
Stuart