What possible situations (or set of variables) could cause the following
error:
"The command or action 'DeleteRecord' isn't available now." Error
Number = 2046.
The routine that gets the error is (comments left in to show various
solutions that all get the same results (error message above):
Private Sub btnDelete_Click()
On Error GoTo Err_btnDelete_Click
'DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
'DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
If Me.Dirty Then
Me.Undo
End If
If Not Me.NewRecord Then
'RunCommand acCmdDeleteRecord
Application.RunCommand acCmdDeleteRecord
End If
Me!cboFindPerson.Requery
Me!cboFindPerson = Me!peopleID
If (SysCmd(acSysCmdGetObjectState, acForm, "frmDataEntry") And
acObjStateOpen) Then
Forms("frmDataEntry")!cboPeople.Requery
End If
Exit_btnDelete_Click:
Exit Sub
Err_btnDelete_Click:
Call ShowError("frmPeople", "btnDelete_Click", Err.Number,
Err.Description)
Resume Exit_btnDelete_Click
End Sub
Regards,
SueB
*** Sent via Developersdex http://www.developersdex.com ***