Error can't find database, but finds it anyways

H

Haze1023

I have an access database (pass-through.mdb) which is a pass-through to
another secure database called (SecureDB.mdb). This pass-through has the
following code which is automatically run with a AutoExec macro and then it
closed the db:
Public Function PassThru()
On Error GoTo PassThru_Err
Dim strPath As String
Dim strAccDir As String
Dim strAccPath As String
strAccDir = SysCmd(acSysCmdAccessDir)
strAccPath = strAccDir & "MSACCESS.EXE"

'Path to database on Server
strPath = Chr(34) & strAccPath & Chr(34) & " " _
& Chr(34) & "\\path\SecureDB.mdb" & Chr(34) & " " _
& "/wrkgrp " & Chr(34) & "\\path\Security.mdw" & Chr(34)
Shell strPath, vbMaximizedFocus
PassThru_Exit:
Application.Quit
PassThru_Err:
Resume PassThru_Exit
End Function

This database has been unchanged for about a year and a half. For a week
now some but not all of my users are getting an error message when they open
the Pass-Through database. BUT it runs the autoexec and the code anyways.
"Windows cannot find file \\path\pass-through.mdb Make sure you typed the
name correctly, and then try again."

I have renamed the db, moved it, and even recreated it entirely, the code
above is the only code in the Pass-Through database. I have also recreated
the shortcuts each time.
I have only been able to determine that the error occurs when I click on a
shortcut to the db, but not if I click on the database itself.
It does not occur when I bypass startup using a shortcut or the db file.
And does not occur when I have the database open and run the code, or if
Access is open before I click on the shortcut.

Of 2 test PC, the one with 2002 gets the error the other with 2003 does not.
But no patches/upgrades/etc. have occurred to either PC. And the only
admin, myself, happened to be out of town serveral days prior to and
following the appearance of the error message. In addtion I have also
noticed a lot of slowness recently when opening and being passed to the
secure Database, which may or may not be related. Other files on the same
network path are not effected by the slowness.

Thank you for any help you can provide I am out of ideas.
 

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