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_C lick
'DoCmd.DoMenuIt em acFormBar, acEditMenu, 8, , acMenuVer70
'DoCmd.DoMenuIt em acFormBar, acEditMenu, 6, , acMenuVer70
If Me.Dirty Then
Me.Undo
End If
If Not Me.NewRecord Then
'RunCommand acCmdDeleteReco rd
Application.Run Command acCmdDeleteReco rd
End If
Me!cboFindPerso n.Requery
Me!cboFindPerso n = Me!peopleID
If (SysCmd(acSysCm dGetObjectState , acForm, "frmDataEnt ry") And
acObjStateOpen) Then
Forms("frmDataE ntry")!cboPeopl e.Requery
End If
Exit_btnDelete_ Click:
Exit Sub
Err_btnDelete_C lick:
Call ShowError("frmP eople", "btnDelete_Clic k", Err.Number,
Err.Description )
Resume Exit_btnDelete_ Click
End Sub
Regards,
SueB
*** Sent via Developersdex http://www.developersdex.com ***