Trying to run a query that only returns most recent values

S

Samantha T

Hi, Please can someone help as I have been trying to solve this for a while.
I have created a database which has several forms and tables. I have 1 main
form (called Change Control) that has many subforms within it - this contain
different pieces of information all relating to the same Request ID (each
record entered into the Change Control form has a new Request ID).
The main Change Control Form contains the following fields:
- Requestor Name
- Requestor Dept
- Date of Request
- RO Contact
- ICT Contact
- Change Type
- Priority
- Downtime Required?
- Downtime Date
- Deadline Date

One of the sub forms then contains the following fields:
- Request ID (this is joined by a relationship with Request ID from the main
Change Control form) this form has its out Primary Key (which is an
autonumber - titled: req_stage_id).
- Stage of Request
- Date

I have managed to create the forms so that all information in each subform
all contain the same Request ID - this is how I want it.
I then want to create a query that shows the lasted values: -
e.g.
If request ID 1 has a status of 'Accepted' on 01/07/07 then a status of 'In
progress' on 03/07/07 then a status of 'Completed' on 05/07/07
If request ID 2 has a status of 'Accepted' on 06/07/07 then a status of 'In
progress' on 07/07/07 then a status of 'Rejected' on 10/07/07

I would only want the query to display one line per record (Request ID)
showing information relating to Requested ID 1 (Requestor Name, Dept,
Deadline, Downtime Required? (and a status of 'completed') - the same with
Request ID 2 but the status would show as 'Rejected' this would then continue
in a list in the query.

Please can some one help me!?

Thanks
Sam
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top