Results 1 to 2 of 2
  1. #1
    meg9222 is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    2

    OnClick_Btn to Macro for Windows Scheduler


    I inherited some MS Apps, that have a 'Run" button to manually run them. My job is to automate them. Im thinking of using Windows Scheduler which can "kick off" macros/modules. My question is how to convert a OnClick_btn to a macro.

    Any help? Am I approaching this wrong? I've been trying to make Public Subs, Public Functions under the Module and Class Module, but not working yet. I'm in 2003 MS Access. Does the .SetFocus and .GetControl commands work here..?

    Thank you so much (I'm a novice to this, obviously)!!!

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Probably depends on the process, but what I do is create a public function in a standard module, and use the RunCode argument in a macro named autoexec to call it. If your existing process uses "Me." to refer to a form, that won't work in a standard module. You'd need the full form reference.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. macro not working in Windows 7 machine
    By vemi007 in forum Programming
    Replies: 2
    Last Post: 04-19-2012, 01:45 AM
  2. Windows 7 scheduler
    By faeren in forum Misc
    Replies: 1
    Last Post: 01-27-2012, 10:26 AM
  3. Macro having issues when run on Windows Scheduler
    By faeren in forum Programming
    Replies: 4
    Last Post: 09-15-2011, 09:59 AM
  4. Replies: 13
    Last Post: 07-18-2011, 10:05 AM
  5. Replies: 3
    Last Post: 07-15-2010, 05:53 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums