Hi,
I am trying to run the following query in a recordset and i get the following error message
Runtime error 3061 - Too few parameters. Expected 1
i am using the following code
The query is using the following SQL if i take out the reference to the form in the query criteria it works fine so it must be something to do with this any help is greatly appreciated
Regards Phill
I am trying to run the following query in a recordset and i get the following error message
Runtime error 3061 - Too few parameters. Expected 1
i am using the following code
Code:
Dim dbsCurrent As Database
Dim rstQAssignedHrsSum As DAO.Recordset
Set dbsCurrent = CurrentDb
Set rstQAssignedHrsSum = _
dbsCurrent.OpenRecordset("Q_SFormTotalHrs1", dbOpenDynaset)
Regards Phill
Code:
SELECT T_ActiveSession.SessionID, T_ActiveSession.ProjID, T_ActiveSession.StartTime, T_ActiveSession.EndTime, T_ActiveSession.SessTypeID, DateDiff("n",[starttime],[endtime]-[break]-[downtime]) AS Expr1, T_ActiveSession.SessComplete, T_ActiveSession.Downtime, T_ActiveSession.Break
FROM T_ActiveSession
GROUP BY T_ActiveSession.SessionID, T_ActiveSession.ProjID, T_ActiveSession.StartTime, T_ActiveSession.EndTime, T_ActiveSession.SessTypeID, T_ActiveSession.SessComplete, T_ActiveSession.Downtime, T_ActiveSession.Break
HAVING (((T_ActiveSession.ProjID)=[Forms]![F_ClientDetails]![SF_Session].[Form]![ProjID]));
Comment