Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2007

    Unanswered: RunApp in Macro not working correctly

    Because of the size restrictions in Access I had to create 4 separate databases to produce a report for my boss. However when I create my Macro in the final database and did a RunApp action to run the macros for the previous 3 databases it bombs...

    I believe the issue lies in the fact that I have a close command for the databases once the active window opens, but the close command works fine when I run the macro from within its home database. It just doesn't work when I try to run the macro from within the final database through the runapp command.

    Any help would be most appreciated!!!

  2. #2
    Join Date
    May 2005
    Can you post what you do have for the macro?
    Me.Geek = True

  3. #3
    Join Date
    Jan 2007
    set warnings - no

    runapp - "C:\Program Files\Microsoft Office\Office11\MSAccess.exe" "C:\Documents and Settings\sturnbullang\My Documents\Shaloom\Lang\Ad-Hoc Requests\Deed EOM Project\Shortcut to mcr 1 - adding new month.mam"

    msgbox - proceed to next step

    the macro for the runapp action is in my first database... see below for what that macro does...

    setwarnings - no

    open query - append monthly data to all data table

    copy object - copy monthly data table to backup database

    delete object - delete monthly data table from current database

    close - close active window

    For some reason everything works fine except when it gets to the close part of my macro. i get the error message "the runmacro action was cancelled. you used a method of the docmd object to carry out an action in visual basic, but then clicked cancel in a dialog box. For example, you clicked close method to close a changed form, then clicked cancel in the dialog box that asks if you want to save the changes you made to the form."

    just an extra note: I did not click anything and I put in the prompt box to automatically save upon closing....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts