Hi everyone,
Here is my problem: I'm trying to open a recordset with the following Sql string
and when I try to execute my code, I get the error: "There is a syntax error in the From Clause."
I really don't know what is my error. Could someone help me please!
Thanks a lot!
Here is my problem: I'm trying to open a recordset with the following Sql string
Code:
Strsql = "SELECT DISTINCT Count([# dossier]) AS Nb_demandes, [Unité responsable] " & _
"FROM (SELECT [table installations 2005].[# dossier], [table installations 2005].[Unité responsable] " & _
"FROM [table installations 2005] " & _
"WHERE (((Month([table installations 2005].[Date d'installation]))= " & MonthSelected & " AND ((Year([table installations 2005].[Date d'installation]))= " & YearSelected & ") AND (([table installations 2005].[Unité responsable]) Like '*ontréal*')))" & _
"GROUP BY [Unité responsable]"
and when I try to execute my code, I get the error: "There is a syntax error in the From Clause."
I really don't know what is my error. Could someone help me please!
Thanks a lot!