N
Nick Bradbury
Hi Everyone
I am having difficulty in creating a query that will update the status of
an order on completion of all the order details, I have pasted the SQL
below. What I am trying to achieve is that the status of the LabOrder is
changed from "Received" to "Testing Complete" once all the LabSamples in a
particular LabOrder are completed. I have made the query below to display
the LabOrders that have all the LabSamples completed but I am unable to use
this to perform an Update query, is there something else I should be doing.
SELECT tblLabSamples.LabNo, tblLabOrders.NoOfSamples, tblLabSamples.Status,
Count(tblLabSamples.Status) AS SumComp
FROM tblLabOrders INNER JOIN tblLabSamples ON tblLabOrders.LabNo =
tblLabSamples.LabNo
GROUP BY tblLabSamples.LabNo, tblLabOrders.NoOfSamples, tblLabSamples.Status
HAVING (((tblLabSamples.Status)="Completed"));
Many Thanks
Nick
I am having difficulty in creating a query that will update the status of
an order on completion of all the order details, I have pasted the SQL
below. What I am trying to achieve is that the status of the LabOrder is
changed from "Received" to "Testing Complete" once all the LabSamples in a
particular LabOrder are completed. I have made the query below to display
the LabOrders that have all the LabSamples completed but I am unable to use
this to perform an Update query, is there something else I should be doing.
SELECT tblLabSamples.LabNo, tblLabOrders.NoOfSamples, tblLabSamples.Status,
Count(tblLabSamples.Status) AS SumComp
FROM tblLabOrders INNER JOIN tblLabSamples ON tblLabOrders.LabNo =
tblLabSamples.LabNo
GROUP BY tblLabSamples.LabNo, tblLabOrders.NoOfSamples, tblLabSamples.Status
HAVING (((tblLabSamples.Status)="Completed"));
Many Thanks
Nick