Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Menu item firing 3 times

Status
Not open for further replies.

fiep

Technical User
Sep 2, 2003
66
NL
Hi,

I have created a custom menu button to print reports on a form. If I click the (custom) menu item the function connected to the button is executed 3 times (and the report is printed 3 times).
Of course it only has to run once. Am I doing something wrong of is it not possible to use custom menu item (with text buttons?).

I call the function using the "On action" option with:
=<functionname>

Thanks.
 
Post the code for the function.

Also, perhaps "On Action" considers muberous actions such as:

Got Focus
On Click
Lost Focus

Maybe this is the source of the three? Don't know for sure, just a thought.

Sean.
 
How are ya fiep . . .

Your obviously calling the function correctly so the function is the culprit!

Post the full function . . .

Calvin.gif
See Ya! . . . . . .
 
The function only contains this:

debug.print "function called"

When I click the menu I have three lines in the debug window. What could be wrong with the function
Furthermore the only action I can think of that can be used with a menu is te onclick. But there is no choice in when te function is called so I would not know what could go wrong there.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top