Attribute VB_Name = "basGenErrorMessage" Option Explicit Sub GenErrorHandler(lngErr As Long, strError As String) Dim strMsg As String, strTitle As String strMsg = "" strTitle = "Error Message" Select Case lngErr 'Case 2456 'The integer reference to the form is invalid Case 2237 strMsg = "Please select an item from the list." Case 3022 strMsg = "The combination of data you are saving already exists. Please enter " & _ "a different combination." Case 3026 strMsg = "There is not enough space available on disk. Please select a " & _ "different destination drive." Case 3044 strMsg = "A filename entered is invalid. The number of characters of the " & _ "filename cannot exceed eight." Case 3051 strMsg = "Drive access error: one or more files cannot be accessed. Make sure that " & _ "the paths entered are valid." Case 3200 strMsg = "You may not delete this record because related records exist in other " & _ "tables. You may edit the record instead." Case 3204 strMsg = "The destination database file already exists, please select another." Case 3421 strMsg = "The value entered is not appropiate for this field." Case 8519 Exit Sub Case 60001 strMsg = "The data source is not available at this time, closing form..." Case 60002 strMsg = "The data source is not updatable." Case 60003 strMsg = "A primary list box cannot be found, closing form..." Case 60004 strMsg = "The TagTools Standard Button Control cannot be found, closing form..." Case Else strMsg = "Error " & lngErr & "- " & strError & " has occured. Please record this " & _ "error and the circumstances under which the error occurred." End Select MsgBox strMsg, 32, strTitle End Sub Sub GenErrorMessage(lngErr As Long, strError As String) Call GenErrorHandler(lngErr, strError) End Sub Function GenSubFormError(lngErr As Long, strError As String) If lngErr <> 2116 Then Call GenErrorHandler(lngErr, strError) End If GenSubFormError = DATA_ERRCONTINUE SendKeys "{ESC}" End Function