Managing Multiple Databases

G

Guest

I would like to manage multiple database switchboards from one central
switchboard. Is that possible?
 
A

Allen Browne

Go to trigeminal.com and in the Utilities section, download the (free) TSOON
utility.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

message
news:[email protected]...
 
G

Guest

Thank you for that tip, but what I really want to do is run the switchboards
of other databases from one open database. I don't want to close the current
database. Or do you know if there is a way (using a command button) to open
a form in another database while keeping the current database open?
 
A

Allen Browne

You could Shell another instance of msaccess.exe, using the command line
parameter to specify the mdb file.

Or you could FollowHyperlink.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

message
 
G

Guest

Thanks again for all your help. I tried creating a command button with the
following code, but Access returns the error message "invalid procedure call
or argument". :

Private Sub OpenPersonnel_Click()
On Error GoTo Err_OpenPersonnel_Click

Dim stAppName As String

stAppName = "C:\Documents and Settings\rdevine\Desktop\ISO
Databases\Personnel Control Process.mdb"
Call Shell(stAppName, 1)

Exit_OpenPersonnel_Click:
Exit Sub

Err_OpenPersonnel_Click:
MsgBox Err.Description
Resume Exit_OpenPersonnel_Click

End Sub
 
A

Allen Browne

With FollowHyperlink you can call the document directly.

With Shell you need to call the executable. You can get the path the the
executable like this:
SysCmd(acSysCmdAccessDir) & "msaccess.exe"
Then add a space and the document name. Something like this:

Call """" & SysCmd(acSysCmdAccessDir) & "msaccess.exe "" ""C:\Documents and
Settings\rdevine\Desktop\ISO Databases\Personnel Control Process.mdb"""

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

message
 
G

Guest

Thank you so much for all your help. I managed to write it correctly ( I
think ). I'm just having one issue. When I leave the file path out of the
code, Access opens successfully. When I add the file path to the code, I get
"file not found" error message. I know the file path is correct, and I've
tried the same routine using Excel and an Excel file. I receive the same
results. If I only include the program reference in the code, it works fine.
As soon as I add a file path, I get the error message. I've included my
code here. Do you see anything wrong with it? :

Private Sub OpenPersonnel_Click()
On Error GoTo Err_OpenPersonnel_Click

Dim stAppName As String

stAppName = SysCmd(acSysCmdAccessDir) & "msaccess.exe" & "C:\Documents
and Settings\rdevine\Desktop\ISO Databases\Personnel Control Process.mdb"
Call Shell(stAppName, 1)

Exit_OpenPersonnel_Click:
Exit Sub

Err_OpenPersonnel_Click:
MsgBox Err.Description
Resume Exit_OpenPersonnel_Click

End Sub
 
A

Allen Browne

The path name contains spaces. You need to embed quotes into the string so
stAppName contains quote marks around the path name.

Double the quotes up to get quotes in the string.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

message
 
G

Guest

OK - last time I ask, but it is still not finding the file. I'm using the
following quotations:

stAppName = SysCmd(acSysCmdAccessDir) & """msaccess.exe""" & """C:\Documents
and Settings\rdevine\Desktop\ISO Databases\Personnel Control Process.mdb"""

I've also tried may other combinations including concatinating anywhere that
has blanks etc., but nothing works. I always get 'file not found' message.

If you reply, that's great, but I don't want to take any more of your time.
You've been a great help so far. Thanks again! -
 
A

Allen Browne

I would have expected
stAppName = """" & SysCmd(acSysCmdAccessDir) & "msaccess.exe""
""C:\Documents
and Settings\rdevine\Desktop\ISO Databases\Personnel Control Process.mdb"""

To check the result makes sense:
Debug.Print stAppName

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

message
 
G

Guest

Eurika! Thank you so much! Your help has been tremendously beneficial to
me. I really appreciate it!! Thanks again!
 

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