Re: Show last 'X' records in a subform
- From: John Smith <johnDOTsmithATbromleyhospitalsDOTnhsDOTuk>
- Date: Mon, 07 Jan 2008 13:05:40 +0000
Create a 'TOP' query based on the table:
SELECT TOP 5 somedate, otherfields
FROM sometable
ORDER BY somedate DESC;
Then base the subform on a query of that query ordered by the ascending date should give you what the users want. The '5' should be whatever number of records you need.
SELECT *
FROM topquery
ORDER BY somedate ;
HTH
John
##################################
Don't Print - Save trees
Steve S wrote:
Have a form that the user uses to input data to create new records. these records are displayed in a subform just below the data entry fields. I now have the subform set to display all records in reverse order so the user can see the latest added at the top fo the subform(decending order). this is confusing for some users ( if not all). they want to see the latest record entered at the bottom of the subform (ascending order) which means they have to hit the scroll bar to get to the bottom of the list. Pain in the....
Is there a way to set the subform properties to show the last X records in ascending order instead of the first x records???
Any help is appreciated.
- Follow-Ups:
- Re: Show last 'X' records in a subform
- From: Tony Toews [MVP]
- Re: Show last 'X' records in a subform
- Prev by Date: Re: Why doesn't this work!!!...
- Next by Date: Re: Bit to mean Yes/No
- Previous by thread: Re: Show last 'X' records in a subform
- Next by thread: Re: Show last 'X' records in a subform
- Index(es):
Relevant Pages
|