Hi guys
I am getting type mismatch in expression. This was working fine earlier and now for a new excelsheet it gives this error message?
Any idea why?
Thanks
I am getting type mismatch in expression. This was working fine earlier and now for a new excelsheet it gives this error message?
Any idea why?
Code:
Private Sub Command42_Click()
Dim xlpath As String
If FileFolderExists("J:\" & Text40 & "-Sent.xls") Then
xlpath = "J:\" & Text40 & "-Sent.xls"
DoCmd.TransferSpreadsheet acLink, acSpreadsheetTypeExcel7, "excelMaster", xlpath, -1
strsql = "UPDATE excelMaster INNER JOIN tblcustomer ON excelMaster.ID = tblcustomer.ID SET tblcustomer.Grading = [excelMaster].[Grading]"
DoCmd.SetWarnings False
DoCmd.RunSQL strsql
DoCmd.SetWarnings True
MsgBox "The Project File " & Text40 & " has been updated in the database"
DoCmd.DeleteObject acTable, "excelMaster"
Else
MsgBox "This Project Ref file does not exist!", vbCritical, "Doublecheck Project Ref"
End If
End Sub
Thanks