Linking from Switchboard to Switchboard on two or more databases

skilche1

Registered User.
Local time
Today, 06:54
Joined
Apr 29, 2003
Messages
226
I am working on a database that will be an addition to an existing one on the company server. However, to make the overall layout not so complex and allow room for other additions in the future, I'd like to keep the databases separate. This will also ensure more efficiency, integrity and troubleshooting overall.

I have the original database with the name of "Cell MFG Screen" that contains a switchboard. I am now creating a db to keep track of manufacturing waste (which will also be on the same server when completed). That switchboard is called "Cell Waste Weight". Again, I want to keep these db's separated from one another as well being able to add future dbs. Now, what my plan is to make up a one db that consists of only a switchboard that will be used as the main switchboard to be able to navigate to other dbs that are located on the server.

Does anyone know how this is done?

Thank you in advance for your help,

~Kilch
 
If you simply want to open another DB from already open db, then there are a couple of ways to go. You may have to change the path to the application.

Private Sub cmdOpenAnotherDatabase_Click()
Dim stAppName As String
stAppName = "C:\Program Files\Microsoft Office\Office\msaccess.exe DBPath"
Call Shell(stAppName, 1)
End Sub

Private Sub OpenYetAnotherDB_Click()
On Error GoTo Err_Command1_Click
Dim oApp As Object
Dim obj1 As Object
Dim obj As String

Set oApp = CreateObject("Access.Application")
Set obj1 = obj.OpenAccessProject("C:\Program Files\Microsoft Office\Office\msaccess.exe DBPath")

oApp.Visible = True

On Error Resume Next
oApp.UserControl = True

Exit_OpenYetAnotherDB_Click:
Exit Sub

Err_OpenYetAnotherDB_Click:
MsgBox Err.Description
Resume Exit_OpenYetAnotherDB_Click

End Sub
 
Thank you Tanis for your response. I am not really knowlegable with VBA yet, but I am taking it that your codes are two seperate codes (as noted below vis "--------------". Is that correct?

TanisAgain said:
If you simply want to open another DB from already open db, then there are a couple of ways to go. You may have to change the path to the application.

Private Sub cmdOpenAnotherDatabase_Click()
Dim stAppName As String
stAppName = "C:\Program Files\Microsoft Office\Office\msaccess.exe DBPath"
Call Shell(stAppName, 1)
End Sub

-------------------------------------------------------------

Private Sub OpenYetAnotherDB_Click()
On Error GoTo Err_Command1_Click
Dim oApp As Object
Dim obj1 As Object
Dim obj As String

Set oApp = CreateObject("Access.Application")
Set obj1 = obj.OpenAccessProject("C:\Program Files\Microsoft Office\Office\msaccess.exe DBPath")

oApp.Visible = True

On Error Resume Next
oApp.UserControl = True

Exit_OpenYetAnotherDB_Click:
Exit Sub

Err_OpenYetAnotherDB_Click:
MsgBox Err.Description
Resume Exit_OpenYetAnotherDB_Click

End Sub
 
OK, I have tried both and neither seems to work. Here are the codes after I modified them.

Please note, that I have enabled permission groups to gain access and located on the company server (S: drive).

Thanks and sorry for being such a pain. :(

Code #1:
Code:
Private Sub cmdOpenAnotherDatabase_Click()
Dim stAppName As String
stAppName = "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE S:\Steve Temp\CellMFGScreendb\Cell MFG Screens.mdb /WRKGRP S:\Steve Temp\CellMFGScreendb\Security.mdw"
Call Shell(stAppName, 1)
End Sub

Code #2:

Code:
Private Sub OpenYetAnotherDB_Click()
On Error GoTo Err_Command1_Click
Dim oApp As Object
Dim obj1 As Object
Dim obj As String

Set oApp = CreateObject("Access.Application")
Set obj1 = obj.OpenAccessProject("C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE S:\Steve Temp\CellMFGScreendb\Cell MFG Screens.mdb /WRKGRP S:\Steve Temp\CellMFGScreendb\Security.mdw")

oApp.Visible = True

On Error Resume Next
oApp.UserControl = True

Exit_OpenYetAnotherDB_Click:
Exit Sub

Err_OpenYetAnotherDB_Click:
MsgBox Err.Description
Resume Exit_OpenYetAnotherDB_Click

End Sub
 
Last edited:
Does anyone know how to perform this operation?

Thanks,

Kilch
 
I can't see why the code is not working? I must admit, I havn't used it with workgroups. but the code looks right. What error messages are you getting?
 
TanisAgain said:
I can't see why the code is not working? I must admit, I havn't used it with workgroups. but the code looks right. What error messages are you getting?

TanisAgain,

I am not getting any error codes persay. When I try to execute the code, nothing happens. Nothing at all.
 
Do A Search For "Dev Ashish" He has a Module Called Shell Execute That will do what you want I use it with a table to open a number of saterllites if ya need futher help there then let me know.

I can't post is due to it's copie wright notice.




mick

Better still Go Hear And look in the API's http://www.mvps.org/access/
 
Dreamweaver said:
Do A Search For "Dev Ashish" He has a Module Called Shell Execute That will do what you want I use it with a table to open a number of saterllites if ya need futher help there then let me know.

I can't post is due to it's copie wright notice.




mick

Thanks Mick. Question, do I do the search on the internet? Or do I search here. Reason being? I am at work right now and I am only allowed on certian sites, so I cannot raom the internet freely.

Thanks.

Steve
 

Users who are viewing this thread

Back
Top Bottom