Unable to Delete a Record
- From: Susan Bricker <slbrick@xxxxxxxxxxx>
- Date: Wed, 19 Oct 2005 22:23:15 GMT
I have a command button on a form that is supposed to Delete the record
being displayed. The record is displayed one to a form. The form is
not a Pop-Up nor is it Modal. Tracing the btnDelete event routine shows
that AllowDeletions is TRUE.
When the Delete button is clicked (without TRACE ON), I get a 'beep',
the recordselector (vertical bar on left of form) gets dark in color,
but the record is not deleted. Also, there is no error message that
pops up.
HOWEVER, when I trace the routine ...
Private Sub btnDelete_Click()
On Error GoTo Err_btnDelete_Click
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
Exit_btnDelete_Click:
Exit Sub
Err_btnDelete_Click:
Call ShowError("frmPeople", "btnDelete_Click", Err.Number,
Err.Description)
Resume Exit_btnDelete_Click
End Sub
When the first DoCmd is executed I get an error that displays from the
error displaying routine ShowError. The error says:
"The command or action 'Select Record' isn't available now"
I've looked around in the database options to see if I have something
set somewhere to prevent Deletions. I can't find anything.
This error happens for two tables using different forms, but the same
logic structure (delete command button with the same DoCmd
instructions).
HELP. I thought that I was so close to finishing this project. Now I'm
stumped again.
Thanks.
Regards,
SueB
*** Sent via Developersdex http://www.developersdex.com ***
.
- Follow-Ups:
- Re: Unable to Delete a Record
- From: Allen Browne
- Re: Unable to Delete a Record
- Prev by Date: Re: Set dbs = CurrentDb Set rst = dbs.OpenRecordset(MySQL) 2nd line yields error "Too few parms"
- Next by Date: Re: Set dbs = CurrentDb Set rst = dbs.OpenRecordset(MySQL) 2nd line yields error "Too few parms"
- Previous by thread: Age Calculation in the future
- Next by thread: Re: Unable to Delete a Record
- Index(es):
Relevant Pages
|