Subreport showing last record

B

Bill Neilsen

I have a report which shows excusable delays for a job. However, some jobs
have more than one delay. I have done this with 2 linked tables - one for the
jobs and another for delays. Consequently the report (subreport) shows all
delays, how do I get the sub to show only the last delay?
 
A

Allen Browne

1. Create a query using the Delays table.

2. Drag all the fields you want into the grid, with the date field *before*
(i.e. to the left of) your primary key.

3. In the Sorting row in query design, choose Descending under both fields.

4. In query design view, open the Properties box (View menu.)
Set the Top Values property to 1.
(If you don't see this, you are looking at the properties of a field, not of
the query.)

5. The query returns only the most recent record. Save. Close.

6. Open the subreport in design view, and change its RecordSource property
to the query you just saved.
 

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