Runtime error 3615

aman

Registered User.
Local time
Today, 07:02
Joined
Oct 16, 2008
Messages
1,251
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?

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
 
the "mismatch" means that you have got 2 fields with the same names,
or something similar, (and VBA don't know what to do).
 
might want to click debug when you get the error message and give us the exact line where the error is occuring. Also, just want to give you a friendly reminder that this is primarily an access forum, although your questions are always welcome you may find more results on an excel forum.
 

Users who are viewing this thread

Back
Top Bottom