Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 10th, 2004, 12:16 PM
Authorized User
 
Join Date: Sep 2004
Location: Twickenham, , United Kingdom.
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
Reply With Quote
  #2 (permalink)  
Old November 15th, 2004, 04:29 PM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
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
Reply With Quote
  #3 (permalink)  
Old November 15th, 2004, 04:31 PM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
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
Reply With Quote
  #4 (permalink)  
Old November 16th, 2004, 03:06 PM
Authorized User
 
Join Date: Sep 2004
Location: Twickenham, , United Kingdom.
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

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Not Finding Time To Purchase Your Favorite Books? Anagha BOOK: Professional XNA Game Programming: For Xbox 360 and Windows ISBN: 978-0-470-12677-6 0 April 21st, 2008 05:00 AM
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



All times are GMT -4. The time now is 03:28 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.