
HELP: Custom Menubar/"Action Failed" msg
Using Access 2.0:
I have created a custom menubar for an app, which uses a number of
functions for execution by the menu choices. A curious thing: if, for
example, a menu choice is meant to Run Code: DoThis() function, and
DoThis() contains:
[Introductory stuff]
DoCmd OpenForm "frm_Form Name"
[stuff]
If Variable=6 Then
End
End If
[more stuff]
Then, when Variable (in truth, the result of an InputBox in which the user
has pressed "Cancel") equals six, the function ends as it ought to, but I
get a macro error box flashing on my screen: "Action Failed" referring to
the execution of the DoThis() function. Press"Halt," and all is well, but
I can't have this happening whenever the user hits "Cancel."
By the way, I attach this same function to the OnClick property of a
button on a form [=DoThis()], and it works just fine without the problem.
It's just in the context of a menu item that this function (and all like
it) exhibits this strange symptom.
Any thoughts, folks?
Thanks.
--
Paul Silverman
Oakland, CA