Identify Last occurance



I can do a little VB and have a reasonable grasp of Access but I have a
problem which I'm not even sure how to tackle!!

My database has a table of Projects, their status and a table of how the
status has changed over the year. Each status change has a uniquie ID, so if
a project has a number of status changes in the year the latest change would
have the highest ID for a particular project. As the database is an actually
an export from an externally produced system, to confuse matters users can
actually pass through the same status several times, but my aim is still the
same - to identify the records which have the last occurance of a particualr
status.

For example:

Status Change ID Project Status Last4?
1 a 1 n
2 a 4 y
3 a 3 n
7 b 1 n
9 b 4 n
15 b 4 y
18 b 3 n

In the above example I would be seeking to flag up Status Change ID record 2
and 15 as these are the highest occurance of status change 4. (If that makes
sense).

At the moment I have the above table in a query, so either I could build an
expression that put a flag in the records I want, or I could do something in
VB. But I thought the Programming forum would be best to raise this in.

Any pointers on how I show tackle this would be much appreciated.

many thanks

Winger


.



Relevant Pages

  • Re: CommonDialog returns wrong context
    ... I tried setting the flag: it does not solve my problem. ... Probably because my app is calling the 'Print' CommonDialog (for which the ... connectionstrings are pointing to a database in the current path. ... connectionstring in the form load procedure does not help because of the Ado ...
    (microsoft.public.vb.bugs)
  • Re: Finding last record in month for each of several types of reco
    ... used to flag the records which are the "Last Record of the Month" ... "Richard Buttrey" wrote: ... >>In your database, ... >>secondary sort key and the Date as the 3rd sort key. ...
    (microsoft.public.excel.programming)
  • Re: Send email
    ... I just want it to send automatically once i open the database without ... calls your email sub and set that macro to run automatically at startup. ... After the Send/Display call, you'll set that flag to True to ...
    (microsoft.public.access.formscoding)
  • Re: Changing auto-Negotiate settings
    ... In Smitty ethernet --> Change / Show Characteristics of an Ethernet Adapter ... The change can be made to the database with the -P flag. ... Subject: Changing auto-Negotiate settings ...
    (AIX-L)