All, why the following path in the code says to me the error message: Trouble opening database: \\bsrfs\shared.... error: could not find the "\\bsrfs\shared\...."
Does this DAO only work with a certain version of ACCESS? Mine is 2010.
Code:Sub OpenAllDatabases(pfInit As Boolean) ' Open a handle to all databases and keep it open during the entire time the application runs. ' Params : pfInit TRUE to initialize (call when application starts) ' FALSE to close (call when application ends) ' Source : Total Visual SourceBook Dim x As Integer Dim strName As String Dim strMsg As String ' Maximum number of back end databases to link Const cintMaxDatabases As Integer = 2 ' List of databases kept in a static array so we can close them later Static dbsOpen() As DAO.Database If pfInit Then ReDim dbsOpen(1 To cintMaxDatabases) For x = 1 To cintMaxDatabases ' Specify your back end databases Select Case x Case 1: strName = "\\bsrfs\shared\Dept_Intake\BSHH_IntakeReferral_Da tabase_be.accdb" 'Case 2: ' strName = "H:\folder\Backend2.mdb" End Select strMsg = "" On Error Resume Next Set dbsOpen(x) = OpenDatabase(strName) If Err.Number > 0 Then strMsg = "Trouble opening database: " & strName & vbCrLf & _ "Make sure the drive is available." & vbCrLf & _ "Error: " & Err.Description & " (" & Err.Number & ")" End If On Error GoTo 0 If strMsg <> "" Then MsgBox strMsg Exit For End If Next x Else On Error Resume Next For x = 1 To cintMaxDatabases dbsOpen(x).Close Next x End If End Sub