title: How to open macros from other databases - VBA, MS Access 2003
body: <p>I've been tasked with creating an Access 2003 application that will act as a focal point for all other databases (6 in total). 
  These 6 databases will each contain a macro used to build data bound for a table called <code>DispenseExport</code>. </p>
  
  <p>Originally each of these databases had their own version of this table but now we have to have them all write to the one application - which I've affectionately codednamed <strong>Omega</strong>. </p>
  
  <p>Omega will contain the <code>DispenseExport</code> table that all the others will write to. It will also be the database that calls the macros from the others to write to it. </p>
  
  <p>So - what is the best way to accomplish this? </p>
  
  <p>I already have a sample sub to call a macro from another database (and works) but the problem here is that it opens the database as any normal user would - Omega will sit on a server and needs to bypass this - by possibly using the <strong>SHIFT-KEY</strong> access method, if best?</p>
  
  <p>How do I do that programmatically in VBA, assuming it's the best way to do so? </p>
  
  <p>Here's what I have so far:</p>
  
  <pre><code>Option Compare Database
  Option Explicit
  
  'Sub to call a macro from another database
  Public Sub CallMacro()
  
  On Error GoTo ErrHandler:
  
  Debug.Print "Opening Macro"
      '/x tells the database to run the macro as soon as it is opened
      Call Shell("msaccess.exe C:\path-to-database\database.mdb /x mcrTestCall", 0)
  Debug.Print "Completed Macro"
  
  ErrHandler:
  
   If Err.Number &lt;&gt; 0 Then
      'Create a message box with the error number and description
      MsgBox ("Sorry but error number " &amp; Err.Number &amp; " occurred; " &amp; vbCrLf &amp; Err.Description)
  End If
  
  End Sub
  </code></pre>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Still haven't found the answer but believe that I'm closing in. I need to find out how to emulate <strong>HOLDING DOWN SHIFT</strong> - any ideas?</p>
  
  <p>Thanks</p>