I'm making a query to show me the IssueID of an issue that is still Active after 2 weeks of being open. Lost yet?
Here is my query so far:
SELECT Issues.ID, Issues.Status, Issues.[Opened Date], Year([Opened Date]) & IIf(Len(Format([Opened Date],"ww"))=1,"0") & Format([Opened Date],"ww") AS IssueWeek, Year(Date()) & IIf(Len(Format(Date(),"ww"))=1,"0") & Format(Date(),"ww") AS ThisWeek, [ThisWeek]-[IssueWeek] AS WeeksOld, Issues.[2weekDate]
FROM Issues
WHERE (((Issues.Status)="Active"));
This returns all the information I need to be able to calculate how many weeks old the issue is. The problem is that when i try putting in "AND (([ThisWeek]-[IssueWeek])>2)" into the where section (to get only the ones over 2 weeks old) it asks me to identify ThisWeek and IssueWeek even though i have already defined in the query! The WeeksOld field works just fine with those variables. When i put all the calculation into a single field and put >2 with it i get an overflow.
Any ideas?
Thanks for your help.
-Pete
Here is my query so far:
SELECT Issues.ID, Issues.Status, Issues.[Opened Date], Year([Opened Date]) & IIf(Len(Format([Opened Date],"ww"))=1,"0") & Format([Opened Date],"ww") AS IssueWeek, Year(Date()) & IIf(Len(Format(Date(),"ww"))=1,"0") & Format(Date(),"ww") AS ThisWeek, [ThisWeek]-[IssueWeek] AS WeeksOld, Issues.[2weekDate]
FROM Issues
WHERE (((Issues.Status)="Active"));
This returns all the information I need to be able to calculate how many weeks old the issue is. The problem is that when i try putting in "AND (([ThisWeek]-[IssueWeek])>2)" into the where section (to get only the ones over 2 weeks old) it asks me to identify ThisWeek and IssueWeek even though i have already defined in the query! The WeeksOld field works just fine with those variables. When i put all the calculation into a single field and put >2 with it i get an overflow.
Any ideas?
Thanks for your help.
-Pete