Allow me to shed some light, you will have to alter the code a little to allow for multiple databases though.
'This button is programmed to read from the combo box on the form
'in accordnance with the variables listed.
Dim strAccDB As String
Dim strAccLoc As String
Dim strAccMtr As String
Dim intResponse As Integer
DoCmd.Hourglass False
If cboDatabase = "Agent - Month End" Then
'The "Yes/No" is a trigger for "If/Then" statements
intResponse = MsgBox("Are you sure you wish to enter the Month End database?", _
vbYesNo + vbQuestion, "Database Entry"

If intResponse = vbNo Then
With cboDatabase
.SetFocus
End With
Else
'Specify path of database listed
strAccDB = """" & "PATH" & """"
'Specify path to access.exe
strAccLoc = SysCmd(acSysCmdAccessDir) & "msaccess.exe"
'States to open new database window and to open specified file
Call Shell(strAccLoc & " " & strAccDB)
End If
'Go to the next possible selection
Else
If cboDatabase = "Tracker" Then
intResponse = MsgBox("Are you sure you wish to enter the database?", _
vbYesNo + vbQuestion, "Database Entry"

If intResponse = vbNo Then
With cboDatabase
.SetFocus
End With
Else
strAccDB = """" & "PATH" & """"
strAccLoc = SysCmd(acSysCmdAccessDir) & "msaccess.exe"
Call Shell(strAccLoc & " " & strAccDB)
End If
End If
End If
This reads from a combo box that gets the information from a table. You can use various IF/Then statements, although I'm sure there is a much shorter way to alter the variable with the pathname, such as including both in a table for your code to read.
Hope this helps!
Jay
![[3eyes] [3eyes] [3eyes]](/data/assets/smilies/3eyes.gif)