Changing from one mdb to another one with a hlep of VB

petko

Registered User.
Local time
Today, 07:14
Joined
Jun 9, 2007
Messages
85
I need a little help in the following topic:

There is an Access (2002) database used at our company covering its different tasks; different mdb files are used for different tasks (storage, invoicing etc.). All of them are linked to a central file that holds the tables.

Some of the users use more files; the same colleague uses for example the storage module and the service module.

I'd like to keep it this structured but I'd like to make it easier to change between the files so the user don't have to quit manually from the storage moduel and open a service module, giving his password for the tenth time per a day.

Could you help with an advice how I could do with VB that by clicking on a button the presently used file closes and another preprogrammed one opens.
(For closing I'm using DoCmd.Quit but no idea how to open something)

I really appreciate your help.

Peter
 
Thanks a lot!
 
I have one more question still in this topic.

I'm using now this code for opening the other database:

Sub OpenDatabase

Dim strDB As String
Dim strCmd As String
Dim objSecuredDB As Access.Application

strDB = "C:\Ugyvitel\Project.mdb"
strCmd = SysCmd(acSysCmdAccessDir) & "\MSAccess.exe " _
& strDB

Call Shell(strCmd, vbNormalFocus)

End Sub

The problem is that Project.mdb pops up automatically a user identifying form that the user needs to fill up for starting (and this would be difficult to change).
To make life easier I would like to fill that form up automatically from here instead of the user. Is there a way of doing that?

Thanks a lot in advance!
 

Users who are viewing this thread

Back
Top Bottom