I am running an access query but when I get to this certain point, I error out. I am trying to import information from excel to access. It has worked in the past but the path broke and no longer works. Can you please assist as to why the error occurs. I bold the error below to show where it stops.
Sub ImportDataFromSpreadSheet(path As String)
On Error GoTo ErrHandler:
If MainSpreadSheetExists(path) Then
Call CleanErrorLog
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel8, _
"PL270", path, True
Call ImportErrorsCheck
End If
Exit Sub
ErrHandler:
Dim message As String
message = "An unhandled exception has occurred: (" & ws.Name & ")" & vbCrLf + _
" Error Message: " + Err.Description + vbCrLf + _
" Error Number: " + CStr(Err.Number) + vbCrLf + _
" Error Source: " + Err.Source
LogError (message)
End Sub
Sub ImportDataFromSpreadSheet(path As String)
On Error GoTo ErrHandler:
If MainSpreadSheetExists(path) Then
Call CleanErrorLog
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel8, _
"PL270", path, True
Call ImportErrorsCheck
End If
Exit Sub
ErrHandler:
Dim message As String
message = "An unhandled exception has occurred: (" & ws.Name & ")" & vbCrLf + _
" Error Message: " + Err.Description + vbCrLf + _
" Error Number: " + CStr(Err.Number) + vbCrLf + _
" Error Source: " + Err.Source
LogError (message)
End Sub