M
microb0x
Is there any difference in the way an Access .mdb file is launched from
directly double-clicking the file through windows explorer versus using
code within another Access file to launch the same file?
Here is my situation:
I have an application that when launched does a check whether or not
its the most current version of the Front End that I have in
production. If the front end is out of date, it closes, and launches
another access .mdb file that serves as an update utitlity. My problem
is when this update utility is launched.
I have code within this update utility to hide the main Access
container window, API courtesy of Dev Ashish, for example:
fSetAccessWindow(SW_HIDE)
I know that there has to be an active form already open to call this
function so I'm opening a hidden form upon open of the Access file,
using the timer to wait 1/2 second then opening my main form and
calling that function.
If I just use windows explorer to launch this update utility directly
it works like a charm. However when I try to launch this utility from
within my other Access file I get an error:
"Cannot hide Access unless a form is on the screen"
I have tried two methods of launching this update utility from within
the other Access file:
Method 1:
Set objAccess = New Access.Application
objAccess.OpenCurrentDatabase "C:\..." ' valid path is there in my code
Method 2:
Application.Followhyperlink "C:\..." ' valid path was used here as
well.
Both methods yield the above error...
Any suggestions or can anyone give any insight into what differences
there are from just double-clicking the file or launching via code?
directly double-clicking the file through windows explorer versus using
code within another Access file to launch the same file?
Here is my situation:
I have an application that when launched does a check whether or not
its the most current version of the Front End that I have in
production. If the front end is out of date, it closes, and launches
another access .mdb file that serves as an update utitlity. My problem
is when this update utility is launched.
I have code within this update utility to hide the main Access
container window, API courtesy of Dev Ashish, for example:
fSetAccessWindow(SW_HIDE)
I know that there has to be an active form already open to call this
function so I'm opening a hidden form upon open of the Access file,
using the timer to wait 1/2 second then opening my main form and
calling that function.
If I just use windows explorer to launch this update utility directly
it works like a charm. However when I try to launch this utility from
within my other Access file I get an error:
"Cannot hide Access unless a form is on the screen"
I have tried two methods of launching this update utility from within
the other Access file:
Method 1:
Set objAccess = New Access.Application
objAccess.OpenCurrentDatabase "C:\..." ' valid path is there in my code
Method 2:
Application.Followhyperlink "C:\..." ' valid path was used here as
well.
Both methods yield the above error...
Any suggestions or can anyone give any insight into what differences
there are from just double-clicking the file or launching via code?