I am tring to run a report on machine cleanings, using a query, In have so far gotten the report to return to me ID #'s that have had 6 mo between service however I only what to see the most recent one any ideas?
Here is the code I am using:
SELECT wo.IDnum, Max(wo.DateIn) AS Datein, wo.Type, wo.Cleanntest, wo.[Black Page Count], wo.[COLOR=Page Count], wo.Void, wo.[WO #], wo.Tech1
FROM wo, machine
GROUP BY wo.IDnum, wo.Type, wo.Cleanntest, wo.[Black Page Count], wo.[COLOR=Page Count], wo.Void, wo.[WO #], wo.Tech1
HAVING (((wo.IDnum)>"1"
AND ((Max(wo.DateIn))<=DateAdd("m",-6,Date())) AND ((wo.Type)=[Forms]![6 Mo Service Report]![Frame2]) AND ((wo.Cleanntest)=Yes) AND ((wo.Void)=No));
Here is the code I am using:
SELECT wo.IDnum, Max(wo.DateIn) AS Datein, wo.Type, wo.Cleanntest, wo.[Black Page Count], wo.[COLOR=Page Count], wo.Void, wo.[WO #], wo.Tech1
FROM wo, machine
GROUP BY wo.IDnum, wo.Type, wo.Cleanntest, wo.[Black Page Count], wo.[COLOR=Page Count], wo.Void, wo.[WO #], wo.Tech1
HAVING (((wo.IDnum)>"1"