RE: Query Criteria
- From: "ladybug via AccessMonster.com" <u21071@uwe>
- Date: Wed, 30 Apr 2008 18:22:16 GMT
Ok, I am so sorry...I am just not following.
Here is the code for the query that I have now:
SELECT tbl_status_of_lif.number AS [Lifecycle #], tbl_status_of_lif.status_dt
AS [Status Date], tbl_status_of_lif.status AS Status, tbl_status_of_lif.
sub_by AS [Submitted by]
FROM tbl_status_of_lif
WHERE (((tbl_status_of_lif.status)<>"lc closed") AND ((tbl_status_of_lif.
status_id) In (SELECT Max(Status_ID) as MaxID
FROM tbl_status_of_lif INNER JOIN
(SELECT number, Max(Status_Dt) as LastDate
FROM tbl_status_of_lif
GROUP BY number) as Tmp
ON tbl_status_of_lif.number = Tmp.number
and tbl_status_of_lif.Status_dt = Tmp.LastDate
GROUP BY tbl_status_of_lif.number, tbl_status_of_lif.Status_dt)))
ORDER BY tbl_status_of_lif.status_dt DESC;
I built the table you told me to. Now where do I put what you told me? Do I
add it to this query or do I create a new query. Sorry that I am not getting
it, but I really do appreciate your help!
KARL DEWEY wrote:
After I posted I realized there needed to be one more query step. Use the
posted query in a second query --
SELECT Min([Dates-5_Bus_Days].Dates) AS MinOfDates
FROM [Dates-5_Bus_Days];
This results in the earlist date in the output. Use it in criteria
<[MinOfDates]
Here is one way. If you know subqueries then this can be done as a sub.[quoted text clipped - 10 lines]
Create a table named CountNumber with integer field named CountNUM
Thanks!
--
Message posted via http://www.accessmonster.com
.
- Follow-Ups:
- RE: Query Criteria
- From: KARL DEWEY
- RE: Query Criteria
- References:
- Query Criteria
- From: ladybug via AccessMonster.com
- RE: Query Criteria
- From: KARL DEWEY
- RE: Query Criteria
- From: KARL DEWEY
- Query Criteria
- Prev by Date: union query of complex queries
- Next by Date: Re: Query results and display nulls?
- Previous by thread: RE: Query Criteria
- Next by thread: RE: Query Criteria
- Index(es):
Relevant Pages
|
|