S
Sammy
Hi, I created a macro that uses "Run Command" and then I chose
"FilterbySelection" from the list of available commands. I used the Wizard
to assign this macro to a command button on my form. When I try to run it I
get the following error: ACTION FAILED. then another box that says COMMAND
NOT AVAILABLE NOW. Even though I can use the regular FilterbySelection
button from the toolbar just fine. Any ideas why this doesn't work? Thank
you.
This is the code behind the button:
Private Sub Command71_Click()
On Error GoTo Err_Command71_Click
Dim stDocName As String
stDocName = "mcrFilterbySel"
DoCmd.RunMacro stDocName
Exit_Command71_Click:
Exit Sub
Err_Command71_Click:
MsgBox Err.Description
Resume Exit_Command71_Click
End Sub
"FilterbySelection" from the list of available commands. I used the Wizard
to assign this macro to a command button on my form. When I try to run it I
get the following error: ACTION FAILED. then another box that says COMMAND
NOT AVAILABLE NOW. Even though I can use the regular FilterbySelection
button from the toolbar just fine. Any ideas why this doesn't work? Thank
you.
This is the code behind the button:
Private Sub Command71_Click()
On Error GoTo Err_Command71_Click
Dim stDocName As String
stDocName = "mcrFilterbySel"
DoCmd.RunMacro stDocName
Exit_Command71_Click:
Exit Sub
Err_Command71_Click:
MsgBox Err.Description
Resume Exit_Command71_Click
End Sub