Access 2007

J

Jeff Boyce

If I have one instance of Access already opened (to database#1), then
attempt to open another Access db (database#2), I get "Permission Denied".
This happens whether I try to Shell out to it, or try using Windows Explorer
to open it.

Now the twist! If I start db#1, then try to start db#3, it works!

There's something about db#2 that makes the Shell command believe that
opening it isn't allowed.

Now the second twist!! After clicking through the "Permission Denied" error
msg, db#2 STILL OPENS! It doesn't do what it's supposed to do (run the code
behind the splash form that opens), but the opening splash form is opened.

Anybody run across this? I haven't been able to spot what's happening (or
what's different) using the Process Monitor...

Thanks!

Jeff Boyce
 
J

Jeanette Cunningham

Hi Jeff,
I remember having a similar sort of issue when trying to open the main
database from a login database using Shell.
If I am remembering correctly, that was something to do with a bad file name
or some similar thing with name of the path or file.
However, it threw me for some time.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
J

Jeff Boyce

Thanks, Jeanette. I'll go back through and re-capture all the
filenames/filepaths...

Regards

Jeff B.
 
J

Jeff Boyce

Jeanette

Filenames and filepaths are correct, so that cause can be ruled out.

I noticed a strange ... coincidence ...

If I insert a Stop command at the top of the code in the Form_Open event of
the splash form of the db#2, then click the run-to-completion button when
the Stop breaks, the process works as expected, with no "permission denied".

If I remark out that Stop and try to run it, the "permission denied" pops
up, the db#2 opens after clicking through the error message, but the process
never completes.

I tried using DoEvents instead of the Stop, hoping that it was a timing
and/or completion of process issue, but that didn't do any good.

Got any other leads?

Thanks for the help.

Regards

Jeff B.
 
J

James A. Fortune

Jeanette

Filenames and filepaths are correct, so that cause can be ruled out.

I noticed a strange ... coincidence ...

If I insert a Stop command at the top of the code in the Form_Open event of
thesplashform of the db#2, then click the run-to-completion button when
the Stop breaks, the process works as expected, with no "permission denied".

If I remark out that Stop and try to run it, the "permission denied" pops
up, the db#2 opens after clicking through the error message, but the process
never completes.

I tried using DoEvents instead of the Stop, hoping that it was a timing
and/or completion of process issue, but that didn't do any good.

Got any other leads?

I noticed that an A2K3 database using Shell to open another A2K3
database stopped working about four months ago or so (part of a
nightly scheduled task), possibly due to a software update from
Microsoft. The fix was to include the path of the Access executable
before the file name. The associations were correct -- I could double
click on the .mdb file to open it from Windows Explorer, but the Shell
command didn't work as before without the executable path included.

James A. Fortune
(e-mail address removed)
 
J

Jeff Boyce

Thanks, James.

It's a bit of a good news/bad news situation...

That sounds like a viable solution ... and I was already including the full
path to the executable :(

Regards

Jeff Boyce

Jeanette

Filenames and filepaths are correct, so that cause can be ruled out.

I noticed a strange ... coincidence ...

If I insert a Stop command at the top of the code in the Form_Open event
of
thesplashform of the db#2, then click the run-to-completion button when
the Stop breaks, the process works as expected, with no "permission
denied".

If I remark out that Stop and try to run it, the "permission denied" pops
up, the db#2 opens after clicking through the error message, but the
process
never completes.

I tried using DoEvents instead of the Stop, hoping that it was a timing
and/or completion of process issue, but that didn't do any good.

Got any other leads?

I noticed that an A2K3 database using Shell to open another A2K3
database stopped working about four months ago or so (part of a
nightly scheduled task), possibly due to a software update from
Microsoft. The fix was to include the path of the Access executable
before the file name. The associations were correct -- I could double
click on the .mdb file to open it from Windows Explorer, but the Shell
command didn't work as before without the executable path included.

James A. Fortune
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top