Hi,
I have a system based on 25 different mdb databases where most of the data is located on a SQL server.
The main database is a protected database with a login dialog. After the login dialog, the user is asked to select a sub-system.
Each sub system is a stand-alone database, some are protected, and some are not, but they may still require the login name to work.
Due to the strange fact that running a mdb database from a remote computer with Access 2007 is at least 5 times slower than with Access 2003, the mdb files have been stored locally on all clients. Since the total size of the mdb files is ~200MB the files has to remain splitted to minimize waiting times during a database update/repair. (60+ clients trying to download a 200MB file simultanously on a 10Mbit network while working on external files may make some users rather furious...)
Currently we do the switching between databases by using the macro function "SendKeys" with the parameters like ^(o)u:\app\startup.mdb%(o), but some users have problems with this command. -The open dialog does not contain the filename, and sometimes the wrong directory is opened.
I have tried %(fo)[databaseName].mdb%(o), but for some users the file menu appers, and the macro stops.
I have also tried %(fo)[databaseName].mdb~, but this causes the macro to loop.
Is there a VBA code that can do the same thing as the Macro function SendKeys ^(o)u:\app\startup.mdb%(o) without sending key-strokes?
I have tried Application.FollowHyperlink "U:\app\startup.mdb", but this causes a new Access window to open without the necesary permissions.
I have also tried Application.OpenCurrentDatabase "U:\app\startup.mdb", but this shows the error message Run-time error '7867': You already have the database open." -The same error occur if I try to open a database that does not exist.
I need to open the new database in the same access-window to prevent the permission error to occur, but at the same time, it must be possible to open multiple instances of the same database on one computer.
-Olav
I have a system based on 25 different mdb databases where most of the data is located on a SQL server.
The main database is a protected database with a login dialog. After the login dialog, the user is asked to select a sub-system.
Each sub system is a stand-alone database, some are protected, and some are not, but they may still require the login name to work.
Due to the strange fact that running a mdb database from a remote computer with Access 2007 is at least 5 times slower than with Access 2003, the mdb files have been stored locally on all clients. Since the total size of the mdb files is ~200MB the files has to remain splitted to minimize waiting times during a database update/repair. (60+ clients trying to download a 200MB file simultanously on a 10Mbit network while working on external files may make some users rather furious...)
Currently we do the switching between databases by using the macro function "SendKeys" with the parameters like ^(o)u:\app\startup.mdb%(o), but some users have problems with this command. -The open dialog does not contain the filename, and sometimes the wrong directory is opened.
I have tried %(fo)[databaseName].mdb%(o), but for some users the file menu appers, and the macro stops.
I have also tried %(fo)[databaseName].mdb~, but this causes the macro to loop.
Is there a VBA code that can do the same thing as the Macro function SendKeys ^(o)u:\app\startup.mdb%(o) without sending key-strokes?
I have tried Application.FollowHyperlink "U:\app\startup.mdb", but this causes a new Access window to open without the necesary permissions.
I have also tried Application.OpenCurrentDatabase "U:\app\startup.mdb", but this shows the error message Run-time error '7867': You already have the database open." -The same error occur if I try to open a database that does not exist.
I need to open the new database in the same access-window to prevent the permission error to occur, but at the same time, it must be possible to open multiple instances of the same database on one computer.
-Olav
Last edited: