Results 1 to 4 of 4
  1. #1
    snipe's Avatar
    snipe is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Sep 2013
    Posts
    287

    Run code on open

    Hey guys,



    I am trying to have a good amount of code run when Access is opened.

    I created an AutoExec macro with a RunCode of "RunMontageAuto()"

    I have a module called AutoMontage with one public sub in it called RunMontageAuto().

    I get the error stating that Access can't find RunMontageAuto.

    What's the best way to do this?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    I thought macros could only call functions. But I don't use macros so not sure.

    Could set a form to open by default and call the sub from the form Open event.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    snipe's Avatar
    snipe is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Sep 2013
    Posts
    287
    Ah good idea.

  4. #4
    snipe's Avatar
    snipe is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Sep 2013
    Posts
    287
    Worked great! Thank's again!

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

Similar Threads

  1. Replies: 4
    Last Post: 03-10-2014, 12:18 PM
  2. Replies: 1
    Last Post: 05-03-2012, 02:25 PM
  3. VB Code to open a form?
    By HeadGasket in forum Access
    Replies: 1
    Last Post: 01-24-2012, 08:26 PM
  4. Open Exclusive Code
    By AKQTS in forum Access
    Replies: 2
    Last Post: 08-11-2011, 10:51 AM
  5. Replies: 2
    Last Post: 02-26-2010, 08:14 AM

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