I have written an SQL statement that works fine in MS Access (as a query) but when I move it into my ASP page as a new Dreamweaver recordset definition it does not work. Dreamweaver is giving me an error stating that "Missing ),] or item in query expression'Last(Month([Enrollment_Information]![enrollment_date]')." I can't see anything missing from the sql. Any help would be appreciated. Thanks in advance.
Here is my sql:
SELECT Member_Information.UserName, Member_Information.UserID, Max(Enrollment_Information.enrollment_date) AS MaxOfenrollment_date, Last(Month([Enrollment_Information]![enrollment_date]) & "/" & Day([Enrollment_Information]![enrollment_date]) & "/" & (Year([Enrollment_Information]![enrollment_date])+[Enrollment_Information]![enrollment_period])) AS Renewal_Date
FROM Member_Information INNER JOIN Enrollment_Information ON Member_Information.UserID = Enrollment_Information.UserID GROUP BY Member_Information.UserName, Member_Information.UserID HAVING (((Member_Information.UserID) Like UID))
ORDER BY Max(Enrollment_Information.enrollment_date)
Here is my sql:
SELECT Member_Information.UserName, Member_Information.UserID, Max(Enrollment_Information.enrollment_date) AS MaxOfenrollment_date, Last(Month([Enrollment_Information]![enrollment_date]) & "/" & Day([Enrollment_Information]![enrollment_date]) & "/" & (Year([Enrollment_Information]![enrollment_date])+[Enrollment_Information]![enrollment_period])) AS Renewal_Date
FROM Member_Information INNER JOIN Enrollment_Information ON Member_Information.UserID = Enrollment_Information.UserID GROUP BY Member_Information.UserName, Member_Information.UserID HAVING (((Member_Information.UserID) Like UID))
ORDER BY Max(Enrollment_Information.enrollment_date)