Attribute VB_Name = "modDataBound"
Option Explicit
Public Const cAppTitle = "DataBound Project"
Public Const cValidDatabase = &H1
Public Const cInvalidDatabase = &HFE
Public Function GetDatabase(dbClients As Database, PathName As String)
    Dim dbTempClients As Database
    Set dbTempClients = dbClients
    On Error GoTo BadPathName
    GetDatabase = True
    Set dbClients = DBEngine.Workspaces(0).OpenDatabase(PathName)
    If InStr(dbClients.TableDefs(0).Name, "Clients") > 0 Then
    Else
        MsgBox "Not a Clients Database", vbCritical, cAppTitle
        GetDatabase = False
        Set dbClients = dbTempClients
    End If
    Exit Function
BadPathName:
'download by http://www.codefans.net
    MsgBox "Error: " & Err.Number & ": " & Err.Description, vbCritical, cAppTitle
    GetDatabase = False
    Set dbClients = dbTempClients
    Resume Next
End Function
