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

While using Shell to open a new instance of same database, using vbHide to Hide the new instance fails.

P: n/a
I have some long Excel routines that I would like to run from my
database in a hidden, second instance of the same Access db.

The macro I pass to the shell command to open the second instance
contains code to 'Hide' the database (from Dev's site) and also the
code which runs the Excel routine. It then quits the database when the
code has finished running.

Here is my code to open a new instance of my db:

NewDBID = Shell(AccessDir & "msaccess.EXE " & strFileName & ShellMacro,
vbNormal)

This works fine -- except that I get the flash on the screen before the
macro passed in the argument fires, hides the window, and begins the
Excel export routine.

When I change the Shell window argument to 'vbHide,' it hides the first
instance of the db(which fired the shell command) and brings me to the
main menu of the second instance -- not what I want. The first instance
should have the focus at all times, while the second runs hidden.

I would like to find a way to avoid this flashing when the second db
opens, just before the 'Hide' code runs -- any ideas?

Feb 24 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.