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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ranking query with placings

Status
Not open for further replies.

TrekBiker

Technical User
Nov 26, 2010
330
GB
My competition application needs to allocate amounts to the three top places for each month's points scores. I'm using a ranking query that generates the winners and ties, and the result look like this.

R_ygslyp.jpg


Without tied places (eg 17 Nov) the allocation of amount factors would be 1/2, 1/3, 1/6. With one winner and two joint second (eg 24 Nov) it would be 1/2, 1/4, 1/4. With two tied winners and one third the amounts would be 5/12, 5/12, 1/6, and so on.

How can I apply these factors to the whole table?
 
This could probably be done in an update query with DLookup() etc but I would write a function to create and loop through a record set.

Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016
 
Thanks for your help, yet again.

I'm not too hot on working with record sets so will see how far I get. Am I right in thinking I'd have to create a form with the source table that leads to the top results, then run some code from there?
 
Someone could probably help with the code if they new the significant table and field names as well as some sample data (no images). You wouldn't necessarily need a form.

Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top