[AccessD] Copy and execute from Access

William Benson vbacreations at gmail.com
Sat Dec 24 15:58:44 CST 2011


I guess  I am connecting the wrong dots... when john said "I have written a
small app that allows.... I thought his app calls something else via a
shortcut. He wrote "A shortcut opens the copyandexecute.mdb..." so i
thought this was the first thing his app did. I didnt realize he meant "I
use a shortcut to launch my app which is named CopyandExecute.mdb"

MY FAULT.pay me no mind.
On Dec 24, 2011 4:49 PM, "William Benson" <vbacreations at gmail.com> wrote:

> I am asking how do you run a shortcut in code. Isn't john doing this with
> vba?
>
> TIA for answering my question so I can follow along.
> On Dec 24, 2011 4:44 PM, "jwcolby" <jwcolby at colbyconsulting.com> wrote:
>
>> That worked perfectly Stuart.  I set the shortcut visible attribute to
>> false and then set the Run Minimized attribute and I never even see the
>> CopyAndRun open.  I now have a splash form that opens to say "be patient"
>> and off we go.
>>
>> John W. Colby
>> Colby Consulting
>>
>> Reality is what refuses to go away
>> when you do not believe in it
>>
>> On 12/24/2011 3:45 PM, Stuart McLachlan wrote:
>>
>>> As I understood it, JC wanted to open his CopyExecute via a Shortcut and
>>> not have the
>>> CopyExecute flash up on screen.  My solution does that.
>>>
>>>
>>> On 24 Dec 2011 at 7:39, William Benson (VBACreations. wrote:
>>>
>>>  But that shortcut... how do you execute it from code, which I think was
>>>> the
>>>> original plan??
>>>> -----Original Message-----
>>>> From: accessd-bounces@**databaseadvisors.com<accessd-bounces at databaseadvisors.com>
>>>> [mailto:accessd-bounces@**databaseadvisors.com<accessd-bounces at databaseadvisors.com>]
>>>> On Behalf Of Stuart McLachlan
>>>> Sent: Saturday, December 24, 2011 4:46 AM
>>>> To: Access Developers discussion and problem solving
>>>> Subject: Re: [AccessD] Copy and execute from Access
>>>>
>>>> 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<http://databaseadvisors.com/mailman/listinfo/accessd>
>>>>> Website: http://www.databaseadvisors.**com<http://www.databaseadvisors.com>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> AccessD mailing list
>>>> AccessD at databaseadvisors.com
>>>> http://databaseadvisors.com/**mailman/listinfo/accessd<http://databaseadvisors.com/mailman/listinfo/accessd>
>>>> Website: http://www.databaseadvisors.**com<http://www.databaseadvisors.com>
>>>>
>>>> --
>>>> AccessD mailing list
>>>> AccessD at databaseadvisors.com
>>>> http://databaseadvisors.com/**mailman/listinfo/accessd<http://databaseadvisors.com/mailman/listinfo/accessd>
>>>> Website: http://www.databaseadvisors.**com<http://www.databaseadvisors.com>
>>>>
>>>>
>>>
>>>
>>>
>> --
>> AccessD mailing list
>> AccessD at databaseadvisors.com
>> http://databaseadvisors.com/**mailman/listinfo/accessd<http://databaseadvisors.com/mailman/listinfo/accessd>
>> Website: http://www.databaseadvisors.**com<http://www.databaseadvisors.com>
>>
>



More information about the AccessD mailing list