I need some help from you guys.
I got the following SQL which I would like to run with vba but it gives an error (errror 13 type mismatch).
The SQL does work when I use it in a query but not in vba:banghead:.
I got the following SQL which I would like to run with vba but it gives an error (errror 13 type mismatch).
The SQL does work when I use it in a query but not in vba:banghead:.
Code:
Dim SQLobsoleteperc As String
SQLobsoleteperc = "SELECT tblDateObs.DateObs, tblStatisticRef.RefPercObsolete" & _
"FROM tblDateObs LEFT JOIN tblStatisticRef ON tblDateObs.DateID = tblStatisticRef.DateID" & _
"GROUP BY tblDateObs.DateObs, tblStatisticRef.RefPercObsolete" & _
"HAVING (((tblDateObs.DateObs) Like " * " & [Forms]![frmObsolescenceMain]![txtObsolescenceUpdate] & " * "));"