Switchboard

JHENDRYX

Registered User.
Local time
Today, 15:20
Joined
Aug 9, 2002
Messages
16
Is it possible to open a second Access database from the switchboard in the first Access database? I figured out how to run a new Access application, but I can't figure out how to have it open a second database without having to click open and selecting it. I hope this makes sense.:confused:
 
Yes,
It is possible and quite easy. You can write a little bit of code and then set your switchboard option to "Run Code" or include the code in a macro if that's easier for you to understand and "Run Macro". I actually manually created a Form instead of a switchboard....that Form gave you the option to advance (which closed the form and opened a hyperlink to the selected database) to one of the databases selected.

But since you've chosen to go with the switchboard, just use code like this:

Private Sub OpenDB2_Click()
On Error GoTo Err_OpenDB2_Click <---not required
Dim ctl As CommandButton
Set ctl = Me!OpenDB2
With ctl
.Visible = True
.HyperlinkAddress = "C:\yourpath\seconddatabase.mdb"
.hyperlink.Follow
End With

Exit_OpenDB2_Click: <---not required
Exit Sub <---not required

Err_OpenDB2_Click: <---not required
MsgBox Err.Description <---not required
Resume Exit_OpenDB2_Click <---not required

End Sub
 
If I create this from a form, where do I find the option to advance? Is that in the form properties?

:)
 
I got it. Creating a form manually worked great thanks for your help.:cool:
 

Users who are viewing this thread

Back
Top Bottom