Menu buttons that run code

  • Thread starter Thread starter Rod
  • Start date Start date
R

Rod

Is there a way to run code from a menu button, avoiding
creating a macro to do so?

Thanks... Rod
 
Yes, you have to write a function in a module and then call that from the button.

For instance if the function is named fGetInfo then you place that in the On
Action property of the button.
 
Yes, you have to write a function in a module and then call that from
the button.

For instance if the function is named fGetInfo then you place that in
the On Action property of the button.

On Action fGetInfo <<<---- No Parens at end

Just to add, because it fooled me for ages:-

It _must_ be a Function and not a Sub even though it does not return a
value. Don't ask me why, perhaps the Access GUI team do so much C++ work
that they forgot their o-level programming...

B Wishes


Tim F
 
Back
Top