Får denne fejl: Microsoft JET Database Engine error '80040e21' You tried to execute a query that does not include the specified expression 'DatePart('yyyy',[Dato])' as part of an aggregate function.
strSQL = "SELECT Count(ID) AS Total, DatePart('yyyy',[Dato]) as aar, DatePart('m',[Dato]) as maanede FROM Userstats GROUP BY DatePart('m',[Dato]) ORDER BY DatePart('yyyy',[Dato]) DESC, DatePart('m',[Dato]) DESC"
strSQL = "SELECT Top 12 Count(ID) AS Total, Year(Dato) as aar, Month(Dato) as maanede FROM Userstats GROUP BY Year(Dato), Month(Dato) ORDER BY Year(Dato) DESC, Month(Dato) DESC;"
rs.Open(strSQL), strConnect, 1 do while not rs.EOF
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.