Fireman1143
IS-IT--Management
I am trying to have a SQL query update a table with the record count from another table which meets the criteria of between two dates from a popup date form. The date part works in other similiar coding where I am pulling individual records by an ID field. This is differnt in that I need the total meetings held between two dates.
The table is "MEETING" and the part after WHERE is used elsewhere and works. My error message notes - "3141: The SELECT statement includes a reserved word or an argument name that is mispelled or missing, or punctuation is incorrect."
Set mtgcnt = db.OpenRecordset("SELECT Meeting.mtgDate, Count(MEETING.mtgID) AS Cnt, from MEETING WHERE (((MEETING.MtgDate)>= #" & begdate & "# And (MEETING.MtgDate) <= #" & enddate & "#));")
It's been a few years since I helped write this application and I thought the change would be easy. Thanks for the assist.
The table is "MEETING" and the part after WHERE is used elsewhere and works. My error message notes - "3141: The SELECT statement includes a reserved word or an argument name that is mispelled or missing, or punctuation is incorrect."
Set mtgcnt = db.OpenRecordset("SELECT Meeting.mtgDate, Count(MEETING.mtgID) AS Cnt, from MEETING WHERE (((MEETING.MtgDate)>= #" & begdate & "# And (MEETING.MtgDate) <= #" & enddate & "#));")
It's been a few years since I helped write this application and I thought the change would be easy. Thanks for the assist.