I'm dealing with an external library called zMagic. I'm finding that just because I replaced one of the tables in the database with a linked table zms_Startup() is failing. I'm pasting the code in the hopes someone might have some insight into why it is failing. The code for this function sits inside an "add-in" database which is referenced by my main database and called from the main database which is preventing me from debugging. I can not step into the function in other words because it is coming from an add-in.
'**********************************************************************
' Function: zms_Startup()
'
' Scope: Global
'
' Overview: This is the application starting point. The attached tables
' are updated and run-time verses development options are set.
'
' Returns: True/False.
'
'**********************************************************************
Function zms_Startup() As Boolean
On Error GoTo ErrorHandler
Dim msg As String, ctr As Integer, fOK As Boolean
Const cstrProc = mModule & " --> zms_Startup"
Call zms_ValidateFoundation
'=============================================================
Dim fReturn As Boolean
Dim datProgStart As Date
Dim vntRetVal As Variant
Dim X As Variant
Dim strFormName As String
Dim fNewDataPath As Boolean
Const ZMS_CONTACT_ONERROR = 11069
zms_DebugLog "zms_Startup: " & CurrentDb.Name, True
datProgStart = Now()
'DoCmd.Hourglass True
' A97 has a bug that causes built in functions like:
' Left, Mid, and Format to not be recognized if the
' running machine has newer versions of Referenced Files (Tool | References)
' The following procedure checks for and solves any version differences
'Call CheckRefs
'Call Syn_References.Test
'This call determines if the command-line arguments
'will override the DATADB settings in the AppOptions.
Call zms_CheckArguments
'Set Code DB
'''''''''''''''''''''''''''''''''''''''
If Not zms_SetGlobalDBRefs() Then 'True if successful.
GoTo Done
End If
'Verify attached tables
'''''''''''''''''''''''''''''''''''''''
'' If Not zms_TableAttachments() Then 'Attachment Failed
'' msg = "We were unable to attach the data tables. " _
'' & "You were given the opportunity to select " _
'' & "the database file, yet that was also unsuccessful. " _
'' & "It is possible that the names of the tables have changed " _
'' & "or have become corrupt. " & zms_LoadString(ZMS_CONTACT_ONERROR)
''
'' MsgBox msg, vbCritical, "Table Attachment Error"
''
'' If zms_RuntimeMode <> grtModeClient Then
'' Stop
'' End If
''
'' Call zms_ApplicationQuit
'' Exit Function
'' End If
''
'' Call zms_CheckVersion
'Run the rest of this code?
'''''''''''''''''''''''''''''''''''''''
If Not zms_GetAppOption("APP_RUN_AUTOEXEC") Then
MsgBox "Not running Startup."
GoTo Done
End If
'Clear Error Log
'''''''''''''''''''''''''''''''''''''''
If False Then ' Not zms_ErrorHandler_ClearERHlogs() Then 'True if successful.
msg = "Unable to clear Error Logs. While it may be possible to continue, " _
& "this indicates a serious problem. " & zms_LoadString(ZMS_CONTACT_ONERROR) & vbCrLf _
& vbCrLf _
& "Would you like to continue?"
If vbYes <> MsgBox("msg", vbQuestion + vbYesNo, "Error Log") Then
GoTo Done
End If
End If
' Open Switchboard if Switchboard Tables exist.
zms_OpenSwitchboard
fReturn = True
'--------------------
Done:
zms_Startup = fReturn
If Not fReturn Then
zms_ApplicationQuit
End If
Exit Function
ErrorHandler:
Select Case Err.Number
Case Else
Select Case zms_InternalErrorHandler(cstrProc, Err.Number, Err.Description)
Case zms_ErrRetry ' Error was auto handled, resume offending line
Resume
Case zms_ErrContinue ' User selected "Continue"
fReturn = False
Resume Done
Case zms_ErrDebug ' User selected "View Code"
Stop
Resume
End Select
End Select
End Function