Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

6 Mo Hell

Status
Not open for further replies.

idcowboy

Technical User
May 30, 2002
34
US
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)>&quot;1&quot;) AND ((Max(wo.DateIn))<=DateAdd(&quot;m&quot;,-6,Date())) AND ((wo.Type)=[Forms]![6 Mo Service Report]![Frame2]) AND ((wo.Cleanntest)=Yes) AND ((wo.Void)=No));
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top