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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Criteria in a query 1

Status
Not open for further replies.

TaniaGBerg

Technical User
Oct 7, 2005
1
US
Hello All,

I will be very grateful if someone will answer my question.

I need to find a turnaround time for a department.

I ran this query:

SELECT TblTracking.DAssign, TblTracking.RecordID, TblTracking.ERNumber, TblTracking.ERName1, TblTracking.UServiceType, TblTracking.UReqType, TblTracking.DRecDate, TblTracking.DocIssueReturnedtoDate, TblTracking.DocIssueReturnedtoArea, TblTracking.DocIssueAllDocReceived, TblTracking.DCompleted, IIf([DocIssueReturnedtoDate] Is Not Null,Work_Days([DRecDate],[DocIssueReturnedtoDate])) AS A, IIf([DocIssueAllDocReceived] Is Not Null,Work_Days([DocIssueAllDocReceived],[DCompleted])) AS B, IIf([DocIssueReturnedtoDate] Is Null,Work_Days([DRecDate],[DCompleted])) AS C, IIf([C] Is Null,[A]+,[C]) AS Turnaround
FROM TblTracking
WHERE (((TblTracking.DAssign)<>"Elaine Behan") AND ((TblTracking.UServiceType) Like "*SPD*") AND ((TblTracking.DRecDate)>#1/1/2005#) AND ((TblTracking.DCompleted) Is Not Null) AND ((TblTracking.Voided)<>-1) AND ((TblTracking.OldRequest)<>-1));

The result shows the turnaround time from 0 to 130 days.
I need the turnaround >20.

Based on the first query I wrote a second query where the criteria in a turnaround field is >20.

I tried to run it and it looks like Access is frozen and the system can not handle it.

Thank you very much for your time and help.

Tania.



When
 
Why not just add
Code:
AND IIf([C] Is Null,[A]+[B],[C])  > 20
to your WHERE clause?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top