1) Why not use unc names and not drive letters.
2) What I do is
a) on start up, open a recordset on a table. If it opens, just run your code.
b) If it doesn't, I then do this
Set dbs = CurrentDb
csql = "SELECT * FROM AttachFileNames"
Set rs2 = dbs.OpenRecordset(csql)
Do Until rs2.EOF
If Not IsNull(rs2("AttachFileName"

) Then
Call AttachTbl(rs2("AttachFileName"

, cDataBasePath)
End If
rs2.MoveNext
Loop
rs2.Close
Set dbs = Nothing
where Attachtbl is
Sub AttachTbl(tblName, dbname As String)
'------------------------------------------------------------
'
' Version number :- dev
'
' Attach a table to a database
'
'
'------------------------------------------------------------
Dim tbl As New TableDef
Dim db As Database
Dim ctbl As String
On Local Error Resume Next
ctbl = tblName
Call DropTables(ctbl)
tbl.NAME = tblName
tbl.SourceTableName = tblName
tbl.Connect = ";database=" & dbname & ";"
tbl.Attributes = 0
Set db = CurrentDb
db.TableDefs.Append tbl
Set db = Nothing
End Sub
and
Sub DropTables(ctbl As String)
On Local Error Resume Next
DoCmd.SetWarnings False
If InStr(ctbl, "["

> 0 Then
DoCmd.RunSQL "DROP TABLE " & ctbl
Else
DoCmd.RunSQL "DROP TABLE [" & ctbl & "]"
End If
DoCmd.SetWarnings True
End Sub
As you have 4 different databases, you could make cDataBasePath a field in AttachFileNames
Is that OK?