locked
Manual Macro versus button macro - errors?? RRS feed

  • Question

  • Hello, 

    I have a Macro that Runs correctly when I double-click it directly in Macros section, but won't when assign that same macro to a Button on a form, I get an error about "the command or action 'gotorecord' isn't available now".  I read somewhere about the "Focus" of the macro being wrong, but I don't know how to fix it.  And why does the macro work correctly when I double-click it directly? 

    I've also tried your suggestion "add it directly from the button's On Click event property, without even creating a separate VBA event procedure, by placing an expression like this on the On Click property line of the property sheet:  =YourFunctionName()."  When I do that, and click the button, I get a different error "Application-defined or object-defined error".

    Can someone please help.

    -Thanks, Ron M.

    Tuesday, September 11, 2018 4:31 PM

All replies

  • Hi Ron,

    Can you post the code inside the macro just in case it might give us a hint why you would get the error? Thanks.

    Tuesday, September 11, 2018 4:34 PM