Solved

Open form to show only last 10 records

Posted on 2014-12-22
2
165 Views
Last Modified: 2014-12-22
I have a form (datasheet) that is bound to a table.  But when the form opens I only want the last 10 records to display.

How can this be done?
0
Comment
Question by:SteveL13
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 7

Accepted Solution

by:
Robert Sherman earned 500 total points
ID: 40512935
If you have an autoincrementing ID field, you can probably use TOP

SELECT TOP 10 FROM table ORDER BY ID DESC;

This would, of course, give the last 10 records in reverse order.  You could then use that as a subquery to re-order them, but I believe you might be able to do the re-ordering in a form property.

SELECT * FROM (SELECT TOP 10 FROM table ORDER BY ID DESC;) ORDER BY ID;
0
 
LVL 7

Expert Comment

by:Robert Sherman
ID: 40512943
..and since you mentioned that the form is bound to the table directly, you would just change the datasource of that form to the SQL query.
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question