> Hi All.
>
[quoted text clipped - 62 lines]
>
> Bill
OK, that seems to have got me past that function and into the next. Now I
get the same error on it. Here's the code for that one
pstrDB does contact the value of the database I'm trying to open.
Function ref_intOpenDatabase(ByVal pstrDB As String) As Integer
On Error GoTo ref_intOpenDatabase_Err
Dim intRet As Boolean
Dim strCurrDB As String
Const NO_DB_OPEN = 7952 '= Illegal function Call - no current
database
' special error handler to catch when no database is opened.
On Error GoTo ref_intOpenDatabase_CurrentDB
strCurrDB = mappAccess.CurrentDb.Name
On Error GoTo ref_intOpenDatabase_Err
If strCurrDB <> pstrDB Then
mappAccess.CloseCurrentDatabase
End If
ref_intOpenDatabase_OPEN:
mappAccess.OpenCurrentDatabase mstrAccappPath & pstrDB, True
intRet = True
ref_intOpenDatabase_Exit:
ref_intOpenDatabase = intRet
Exit Function
ref_intOpenDatabase_Err:
intRet = False
MsgBox "Error: " & Error$, vbExclamation, "ref_intOpenDatabase()"
Resume ref_intOpenDatabase_Exit
ref_intOpenDatabase_CurrentDB:
If Err = NO_DB_OPEN Then
Resume ref_intOpenDatabase_OPEN
Else
intRet = False
MsgBox "Error: " & Error$, vbExclamation, "ref_intOpenDatabase()"
Resume ref_intOpenDatabase_Exit
End If
End Function
> Shouldn't intRet be set to Boolean instead of Integer?
> Set the Access object to (Access.application)
[quoted text clipped - 66 lines]
>>
>> Bill