Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"Top Select" feature in Access

Status
Not open for further replies.

jenni

Technical User
May 12, 2000
21
US
in the query design mode,i have the ability to display either the top xx lines of my result, or the top x percent.&nbsp;&nbsp;How can I control this feature over a form?<br><br>My goal is to allow my colleages to create Hitlists over User-friendly forms (because not all of them are capable of working with access queries).&nbsp;&nbsp;However, each has different needs, some would like to see the top 100 results, others only the top 20.&nbsp;&nbsp;How can I set up my form, so that each can determine their own hitlists.&nbsp;&nbsp;<br>&nbsp;
 
Try something like this:<br><br>Dim strGetSQL As String<br>dim number as long<br><br>number=Inputbox(&quot;How many top records?&quot;)<br><br>strgetsql= &quot;SELECT TOP &quot; & number & &quot; Products.ProductName] AS MostExpensiveProducts, Products.UnitPrice FROM Products ORDER BY Products.[UnitPrice] DESC;&quot;<br><br>Me.RecordSource = strGetSQL<br>
 
Cornerstone, where would this statement be placed? I am trying to do something similar, and as of yet have had no luck.<br>Thanks
 
will5, it's SQL statement... so you can put it in the recordsource property of a form, or in SQL view of query <p>Mohamed Aly<br><a href=mailto:samara_79@hotmail.com>samara_79@hotmail.com</a><br><a href= > </a><br>
 
Just checking, I must have something else wrong as I have tried both.<br><br>Thanks
 
I have &quot;Using Access 97&quot; Second Edition and another Programming in Access 97 handbook and I can't find these tips and tricks in either.&nbsp;&nbsp;Where do you look this stuff up?&nbsp;&nbsp;Can you recommend a better book?&nbsp;&nbsp;I have only been working with Access for about half a year.&nbsp;&nbsp;I have no expierence with computer programming or SQL.&nbsp;&nbsp;Is there an easy-read type of handbook for this stuff?&nbsp;&nbsp;The Programming book that I have is unfortunately in German (I am american, but work in Germany).&nbsp;&nbsp;My German is good, but not that good that I understand all these specialized terms for programming.&nbsp;&nbsp;<br><br>Thank you so much for all your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top