DAO SQL COUNT SYNTAX

  • Thread starter Thread starter Mary
  • Start date Start date
M

Mary

I am getting a parameter error. I thought, I have a
syntax error, tried many things, nothing works.
Can someone check this for me.
The error is
Too few Parameters. Expected 1.:3061

strSQL = "SELECT CLIENT_NAME, CLNT_ID," _
& " COUNT(Forecast_Date) AS CountOfForecast_Date " _
& " FROM tblFINAL_FORECAST GROUP BY CLIENT_NAME, CLNT_ID;"

Set rsMCT = CurrentDb.OpenRecordset(strSQL)

What am I doing wrong. I don't have any parameters in my
statements, or I think it the syntax,

Thank you in advance.
 
Mary said:
I am getting a parameter error. I thought, I have a
syntax error, tried many things, nothing works.
Can someone check this for me.
The error is
Too few Parameters. Expected 1.:3061

strSQL = "SELECT CLIENT_NAME, CLNT_ID," _
& " COUNT(Forecast_Date) AS CountOfForecast_Date " _
& " FROM tblFINAL_FORECAST GROUP BY CLIENT_NAME, CLNT_ID;"

Set rsMCT = CurrentDb.OpenRecordset(strSQL)

What am I doing wrong. I don't have any parameters in my
statements, or I think it the syntax,

Check for a misspelled field or table name.
 
Back
Top