Help on macro....

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, I created a macro that calls the RunCode action.
From some mysterious reason, the code runs 3 times (no matter what !)

ideas anyone ?
 
Can you post the
(1) full macro's contents?
(2) the code that is being run?
(3) which event is running the macro?
 
The macro is launched from a menu bar that I created myself.
It contains only one line - RunCode Forms!FrmName!Func1
This function is declared in form FrmName as public function that calls the simple MsgBox.
I know I can call MsgBox directly from the macro - but this is just a test for somthing far more complicated that I cant do in a macro.
I need to do this because i want the menu command would use data from the form and call a few more internal functions in this form.

That's it...

If Anyone knows also of a method to call a VB procedure directly from the menubar without passing through the macro it would be most usefull :-))

Thank's in advance !
 
"It contains only one line" = what is "It"? The macro's step?

If Func1 is a public function with FrmName, perhaps use this as the function
argument for the macro:
Forms!FrmName.Func1

Macros are the way to run things from menu bars.

--

Ken Snell
<MS ACCESS MVP>

Daniel said:
The macro is launched from a menu bar that I created myself.
It contains only one line - RunCode Forms!FrmName!Func1
This function is declared in form FrmName as public function that calls the simple MsgBox.
I know I can call MsgBox directly from the macro - but this is just a test
for somthing far more complicated that I cant do in a macro.
I need to do this because i want the menu command would use data from the
form and call a few more internal functions in this form.
That's it...

If Anyone knows also of a method to call a VB procedure directly from the
menubar without passing through the macro it would be most usefull :-))
 
It = The macro.
the line in the macro: RunCode Forms!FrmName.Func1

That's it -> I don't know why it runs this 3 times :-(
 
The code in Func1:

public function Func1()
MsgBox "The customer's name is: " & me!Name
end function
 
I have no idea why it would run three times. If you can zip up small sample
of the database and email to me with instructions for which menu button to
click, etc., I'll take a look.

My address is obtained by deleting "this is not real" from my reply address.
 
Back
Top