
Strange error msg 2486 -- you can't carry out this action at the present time
I have a form with a subform. In the subform, I'm putting
a button in the header that allows the user to toggle
between sort ascending and descending. The buttons works
perfectly on the first click but will not allow access to
do anything else. If you click another button (any
button) you get the message "error 2486 -- you can't carry
out this action at the present time".
==========================================================
Private Sub CmdSortEvent_Click()
If Me.CmdSortEvent.Caption = "Events (a-z)" Then
DoSort "txtevent_ID", acCmdSortAscending
Me.CmdSortEvent.Caption = "Events (z-a)"
Else
DoSort "txtevent_ID", acCmdSortDescending
Me.CmdSortEvent.Caption = "Events (a-z)"
End If
End Sub
Private Sub DoSort(sCtrlName As String, lngSortMethod)
'generic procedure to do sort on a current recordset
DoCmd.Hourglass True
Screen.ActiveForm.AllowAdditions = False
DoCmd.GoToControl sCtrlName
DoCmd.RunCommand lngSortMethod
DoCmd.Hourglass False
End Sub
==========================================================
Any ideas,
Bill