title: How can Microsoft Access be restarted with VBA...from within Microsoft Access..?
body: <p>How can I use VBA to restart Microsoft Access 2007 from within the same DB file..??</p>
  
  <p>I'm developing a DB that will eventually be packaged &amp; distributed with the Runtime. For development I'm changing various UI settings, and renaming the file back &amp; forth between *.accdb and *.accdr. But I would like to use a fully programmatic method, which I would then assign to a button or keystroke.</p>
  
  <p>But as anyone who's tried can tell you, one cannot easily use VBA to restart Access from within the same DB. I tried the code here: <a href="https://stackoverflow.com/questions/1460129/ms-access-how-to-compact-current-database-in-vba">MS Access: how to compact current database in VBA</a>, but I received the error message "You cannot compact the open database by running a macro or Visual Basic code."</p>
  
  <h2><a href="https://i.stack.imgur.com/CUguV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CUguV.png" alt="enter image description here"></a></h2>
  
  <p>I have various half-baked ideas how to "bounce" the restart off a VBS script, CMD file, or another Accdb file, but I wanted to ask who else may have done this successfully..??</p>
  
  <p>What variety of ways have others done this with success..??</p>