Hi,
I have a select query that works out the difference between a start and an end time using datediff as follows
SELECT T_ActiveSession .SessionID, T_ActiveSession .ProjID, T_ActiveSession .StartTime, T_ActiveSession .EndTime, T_ActiveSession .SessTypeID, DateDiff("n",[starttime],[endtime]) AS Expr1
FROM T_ActiveSession
GROUP BY T_ActiveSession .SessionID, T_ActiveSession .ProjID, T_ActiveSession .StartTime, T_ActiveSession .EndTime, T_ActiveSession .SessTypeID
HAVING (((T_ActiveSess ion.ProjID)=[Forms]![F_ClientDetails]![SF_Session].[Form]![ProjID]) AND ((T_ActiveSessi on.SessTypeID)=[Forms]![F_ClientDetails]![SF_Session].[Form]![SessTypeID]));
I then need to update a table with the following update query
UPDATE T_AssignHours SET T_AssignHours.C ompletedHrs = Sum([Query1]![Expr1]);
and i get the following message
"you tried to execute a query that does not include the specified expression 'CompletedHrs' as part of the aggregate function"
Any help is appreciated
I have a select query that works out the difference between a start and an end time using datediff as follows
SELECT T_ActiveSession .SessionID, T_ActiveSession .ProjID, T_ActiveSession .StartTime, T_ActiveSession .EndTime, T_ActiveSession .SessTypeID, DateDiff("n",[starttime],[endtime]) AS Expr1
FROM T_ActiveSession
GROUP BY T_ActiveSession .SessionID, T_ActiveSession .ProjID, T_ActiveSession .StartTime, T_ActiveSession .EndTime, T_ActiveSession .SessTypeID
HAVING (((T_ActiveSess ion.ProjID)=[Forms]![F_ClientDetails]![SF_Session].[Form]![ProjID]) AND ((T_ActiveSessi on.SessTypeID)=[Forms]![F_ClientDetails]![SF_Session].[Form]![SessTypeID]));
I then need to update a table with the following update query
UPDATE T_AssignHours SET T_AssignHours.C ompletedHrs = Sum([Query1]![Expr1]);
and i get the following message
"you tried to execute a query that does not include the specified expression 'CompletedHrs' as part of the aggregate function"
Any help is appreciated
Comment