Format a report from form/subform

bellemmar

Registered User.
Local time
Today, 03:34
Joined
Mar 9, 2011
Messages
64
I have a form with a subform with parent/child linked fields called ID.

I want to format a report that shows all of the parent form fields but only the MOST RECENT of each of the numerous child entries.

For instance, in the parent form, the record entry is called Goal 1 and the subform contains many entries under this goal. But I only want the report to show the most recent of those entries rather than all of them (which it's currently doing).

Help!
 
1. Sort the query behind the subform in Descending order by whatever field that determines it as the latest record. I assume this would be an auto generated ID or a date/time stamp.
2. Use the TOP predicate in the SQL of the query to show only the first record. i.e.
Code:
SELECT [COLOR=Red]TOP 1[/COLOR] Field1, Field2, Field3 
FROM TableName
 
And if I don't have a query behind the subform?
 

Users who are viewing this thread

Back
Top Bottom