p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Access VBA (http://p2p.wrox.com/forumdisplay.php?f=80)
-   -   Finding the row with the lowest time value (http://p2p.wrox.com/showthread.php?t=21068)

Paulsh November 10th, 2004 12:16 PM

Finding the row with the lowest time value
 
I have an access table with many records related to individual race performances by athletes. An example might be:

Athlete Name Race# Date Position Run Time
phil aiken 3 16 October 2004 10 00:23:10
andy bickerstaf 5 30 October 2004 3 00:19:44
karen broadbent 1 02 October 2004 10 00:24:56
karen broadbent 2 09 October 2004 11 00:24:32
karen broadbent 4 23 October 2004 14 00:24:56

As you can see some athletes have run this particular race many times. I am trying to find the record with the fastest Run Time. How do I filter or extract this data?

Your help is appreciated...


mmcdonal November 15th, 2004 04:29 PM

Hi,

   If you base your results on a query, perhaps passing the athlete's name from a combo box, then you can create the query and and sort the time field in ascending order. Then go to the query's Properties dialog box, and on the line "Top Values" put a "1". You will have to enter 1 and then a space since it will try to autocomplete 100.

   Then when you pass the athlete's name as a parameter, it will only return that athlete's fastest time.


mmcdonal

mmcdonal November 15th, 2004 04:31 PM

If you are trying to find the record with the fastest run time for all athletes, then the Top Value of 1 will do it for all athletes.


mmcdonal

Paulsh November 16th, 2004 03:06 PM

Thank you for your help. I have succesfully achieved what I set out to with your help.

Regards
Paul



All times are GMT -4. The time now is 06:49 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.