J
Jeff
I want to set the recordsource in the on open event of my form. I am having
trouble with the code,
Dim str_sql As String
str_sql = "SELECT DateAdd("d",-Weekday([meetingdate]),[meetingdate])+1
AS WeekOf, tbl_ReportTempData.employeeID FROM tbl_ReportTempData GROUP BY
DateAdd(d,-Weekday([meetingdate]),[meetingdate])+1,
tbl_ReportTempData.starttime, tbl_ReportTempData.employeeID ORDER BY
tbl_ReportTempData.starttime;"
Me.RecordSource = str_sql
The problem is in the "str_sql =" line. I am getting a syntax error. I am
sure is does not like the quotes in the DateAdd.
What do I do?
trouble with the code,
Dim str_sql As String
str_sql = "SELECT DateAdd("d",-Weekday([meetingdate]),[meetingdate])+1
AS WeekOf, tbl_ReportTempData.employeeID FROM tbl_ReportTempData GROUP BY
DateAdd(d,-Weekday([meetingdate]),[meetingdate])+1,
tbl_ReportTempData.starttime, tbl_ReportTempData.employeeID ORDER BY
tbl_ReportTempData.starttime;"
Me.RecordSource = str_sql
The problem is in the "str_sql =" line. I am getting a syntax error. I am
sure is does not like the quotes in the DateAdd.
What do I do?