Sub exaCurrentDB()
Dim db, dbExtra, dbOriginal As Database
Dim i As Integer
Set dbOriginal = DBEngine(0)(0)
Debug.Print DBEngine.Workspaces(0).Databases.Count
Set dbExtra = CurrentDb()
Debug.Print DBEngine.Workspaces(0).Databases.Count
For Each db In DBEngine.Workspaces(0).Databases
Debug.Print db.Name
Next db
dbExtra.Close
End Sub
|