| ACC97: Function Called from Command Bar Control Executes 3 TimesID: Q162660 
 | 
Advanced: Requires expert coding, interoperability, and multiuser skills.
If you call a procedure in a form class module from the OnAction property
of a command bar control, the function runs three times.
Store the procedure in a standard module instead of in a form's class module. When you call a procedure in a standard module in the OnAction property of a command bar control, the procedure runs only once.
Microsoft has confirmed this to be a problem in Microsoft Access 97.
      Function CmdBarTest()
         MsgBox "Running CmdBarTest()"
      End Function =Forms!Form1.CmdBarTest
For more information about running a Visual Basic function from a button on a custom toolbar, search the Help Index for "toolbar buttons, adding to toolbars," or ask the Microsoft Access 97 Office Assistant.
Additional query words: menu command bar tool class
Keywords          : kbusage MdlProb 
Version           : 97
Platform          : WINDOWS 
Issue type        : kbbug Last Reviewed: April 30, 1999