run time error 13 type mismatch

compu

Registered User.
Local time
Today, 22:25
Joined
Jul 18, 2012
Messages
22
strSQL = strSQL & "WHERE (((Source.Headline) Like " * " & Chr(34) & [Text0].value & Chr(34) & " * " );"
 
Do you have a specific question?
Are we suppose to guess what strSQL contains?

Set up some context to your sql and tell us exactly what you are trying to do.
 
Hi sorry about that

Private Sub Command2_Click()
Dim strSQL As String
strSQL = "SELECT Cluster_Dept.ID, Cluster_Dept.Cluster_ID, Cluster_Dept.Dept_ID, Clusters.Cluster_Desc, Department.Dept_Desc, " & _
"Source.Day_Month_Year, Source.Original_Source, Source.Headline, Source.Issue, Source.Analysis, Source.Action " & _
"FROM Source INNER JOIN (Department INNER JOIN (Clusters INNER JOIN Cluster_Dept ON Clusters.Cluster_ID " & _
"= Cluster_Dept.Cluster_ID) ON Department.Dept_ID = Cluster_Dept.Dept_ID) ON Source.ID = Cluster_Dept.ID "
code:
MsgBox strSQL
strSQL = strSQL & " " & "WHERE [Source].Headline = " Like "*" & Chr(34) & [Text0] & "*" & ";"

' Assign SQL code to query that the entry form uses
CurrentDb.QueryDefs("Search_by_Clusters and date").SQL = strSQL

'Open the report
DoCmd.OpenReport "Search_by_Clusters and date", acViewReport
End Sub

' Assign SQL code to query that the entry form uses
CurrentDb.QueryDefs("Search_by_Clusters and date").SQL = strSQL

'Open the report
DoCmd.OpenReport "Search_by_Clusters and date", acViewReport
 

Users who are viewing this thread

Back
Top Bottom