[AccessD] Copy and execute from Access

Stuart McLachlan stuart at lexacorp.com.pg
Sat Dec 24 03:46:04 CST 2011


You need two steps:

1. Hide on Startup. You can call the following function from an Autoexec macro:
Option Compare Database
Option Explicit
Const SW_HIDE = 0
Const SW_NORMAL = 1
Const SW_MINIMIZED = 2
Const SW_MAXIMIZED = 3

Private Declare Function ShowWindow Lib "user32" _
  (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long

Function Startup() As Long
   Call ShowWindow(hWndAccessApp, SW_HIDE)
End Function

By itself, that shows a flash of Access as it opens.  Tou get rid of that flash, create a shortcut 
to the Access application, set it's "Run:" property to Minimized.    Open your application via 
the shortcut and you  shouldn't  see a thing.

-- 
Stuart


On 23 Dec 2011 at 3:18, jwcolby wrote:

> I have written a small app that allows me to define an access application and the file(s) that make 
> it up, and a destination directory to copy it to.  A shortcut opens the access CopyAndExecute.mdb 
> and passes in a command line argument which is looked up in a table.  The recordset opened then 
> defines what files to copy, the source and destination, the FE to execute, and then opens that app.
> 
> It all is working now however I would like CopyAndExecute to open invisible.  ATM it opens as a 
> normal Access application which can be seen until the target FE is up and running and CopyAndExecute 
> closes.
> 
> Is there a way to cause Access to open invisible?
> 
> -- 
> John W. Colby
> Colby Consulting
> 
> Reality is what refuses to go away
> when you do not believe in it
> 
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 






More information about the AccessD mailing list