By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,966 Members | 2,054 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,966 IT Pros & Developers. It's quick & easy.

Launching Access .mdb file directly vs. launching with VBA

P: n/a
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:
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
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?

Aug 11 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.