> They are both double. I tried CCUR on both and still the same problem.
> When I use the same query as SELECT rather than UPDATE, it matches all the
[quoted text clipped - 60 lines]
>> > > >
>> > > > Please help. Can't figure out where the error is.
Access 2002. No other database engine.
I'm trying another approach.
Created a Select query which has the Sum. Then trying to create an Update
query using the previous query. It gives me an error: "Operation must use an
updateable query". Maybe you can help with this one. Below are my queries:
QUERY1:
SELECT Sum(Nz([ImportedSFUS].[Hours],0)) AS Expr1, timesheets.EmployeeID,
timesheets.WeekEnding, timesheets.HoursWorked, timesheets.InvoiceTallyflag
FROM ImportedSFUS INNER JOIN timesheets ON (ImportedSFUS.EmpID =
timesheets.EmployeeID) AND (ImportedSFUS.Weekending = timesheets.WeekEnding)
GROUP BY timesheets.EmployeeID, timesheets.WeekEnding,
timesheets.HoursWorked, timesheets.InvoiceTallyflag
HAVING (((timesheets.HoursWorked)=Sum(Nz([ImportedSFUS].[Hours],0))));
QUERY2:
UPDATE timesheets INNER JOIN SumOfInvoiceHours ON (timesheets.WeekEnding =
SumOfInvoiceHours.WeekEnding) AND (timesheets.EmployeeID =
SumOfInvoiceHours.EmployeeID)
SET timesheets.InvoiceTallyflag = Yes;
> Anyone else?
>
[quoted text clipped - 67 lines]
> >> > > >
> >> > > > Please help. Can't figure out where the error is.
John Spencer - 14 Nov 2005 20:58 GMT
You can never use an aggregate query in an UPDATE with Access.
If query one is giving you the correct information, I would suggest you
might use it to do an APPEND to a temporary work table. Then you can use
that temporary work table in the UPDATE query.
I still have a feeling that the problem has something to do with trying to
match the SUM of HOURs to HoursWorked. IF you hadn't said that the query
works as a SELECT query I would be concentrating on that aspect of the
situation.
> Access 2002. No other database engine.
>
[quoted text clipped - 102 lines]
>> >> > > >
>> >> > > > Please help. Can't figure out where the error is.