I have a table called Requests and I'd like to return values grouped by the month value of a field named 'Sentdate' which is formatted in the database as a General Date. I tried the following but gat a "no value given for one or more parameters" error. What am I doing wrong?
rs.Open "SELECT count(*), DatePart(month, SentDate) FROM Requests group by SentDate", cn, adOpenDynamic, adLockOptimistic
rs.Open "SELECT count(*), DatePart(month, SentDate) FROM Requests group by SentDate", cn, adOpenDynamic, adLockOptimistic