S
Snurre Sprett
Hi.
The query works fine, but a want it in VBA..
I want the user to input a year in a input box when
running VBA, but it will not accept the code (below)
copied from the SQL option in the datasheet view. VBA
errors on the first "yyyy".
SELECT Ansatte.*, Prosjekter.*, DatePart("yyyy",[Enddate])
AS Endyear FROM Ansatte INNER JOIN Prosjekter ON
Ansatte.AnsattID = Prosjekter.AnsattID
WHERE (((DatePart("yyyy",[Enddate]))=[End year]))
ORDER BY DatePart("yyyy",[Enddate]) DESC;
Can anyone help me, please ?
Regards
Snurre
The query works fine, but a want it in VBA..
I want the user to input a year in a input box when
running VBA, but it will not accept the code (below)
copied from the SQL option in the datasheet view. VBA
errors on the first "yyyy".
SELECT Ansatte.*, Prosjekter.*, DatePart("yyyy",[Enddate])
AS Endyear FROM Ansatte INNER JOIN Prosjekter ON
Ansatte.AnsattID = Prosjekter.AnsattID
WHERE (((DatePart("yyyy",[Enddate]))=[End year]))
ORDER BY DatePart("yyyy",[Enddate]) DESC;
Can anyone help me, please ?
Regards
Snurre