R Rod Aug 10, 2003 #1 Is there a way to run code from a menu button, avoiding creating a macro to do so? Thanks... Rod
J John Spencer (MVP) Aug 10, 2003 #2 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.
T Tim Ferguson Aug 11, 2003 #3 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 Click to expand... 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
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 Click to expand... 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