Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 10th, 2004, 12:16 PM
Authorized User
 
Join Date: Sep 2004
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Paulsh Send a message via Yahoo to Paulsh
Default 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...

__________________
Paul
 
Old November 15th, 2004, 04:29 PM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

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
 
Old November 15th, 2004, 04:31 PM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

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
 
Old November 16th, 2004, 03:06 PM
Authorized User
 
Join Date: Sep 2004
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Paulsh Send a message via Yahoo to Paulsh
Default

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

Regards
Paul






Similar Threads
Thread Thread Starter Forum Replies Last Post
Finding the 10th row in a xsl SOMANATHAN10 XSLT 4 February 19th, 2007 04:39 AM
lowest Price Fetching dpkbahuguna Beginning VB 6 2 February 28th, 2006 07:15 AM
get a lowest price Jane SQL Language 1 March 11th, 2005 10:02 AM
datagrids question -- finding a specific row bazookajoe76 C# 1 January 22nd, 2005 12:08 PM





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