469,951 Members | 2,755 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,951 developers. It's quick & easy.

"The command or action 'xxxxxx' is not available now" Error

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 ***
Nov 13 '05 #1
0 3777

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by John Phelan-Cummings | last post: by
1 post views Thread by deane.barker | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.