Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Ranking in Access with Points
Darrin Hebert 
     
4 years ago
I have a potentially uncommon problem I'm trying to solve.

Overview:
Imagine playing golf with a group of people with recurring tournaments.  There is a scoring system that awards points based on how your score compares to others.
I.E. 1st place awards 100 pts, 2nd 95, 3rd 90, and so on.

Problem:
I have solved for ranking the scores.  my challenge is on how to handle some limitations with players getting the same score and therefore getting the same rank.  (I can deal with this as is) however, for the players that get the same score, I want to calculate how points are distributed amongst them.  

Rules for distribution of points when ties occur:
sum points for ranks 1,2,3... in this case 100+95+90=285, then evenly assign to each tying golfer... in this case that would give golfers 1,2,3 95 points each (285/3)... note that it is also possible for there to be other tying scores down the list (golfers 15 & 30 have a score of 40)

Ranks & Points:
1-100
2-95
3-90
4-85

Example golfer, tourn scores, ranks & points:
golfer 1, score 30, rank 1, points 100
golfer 2, score 30, rank 1, points 100
golfer 3, score 30, rank 1, points 100
golfer 4, score 31, rank 4, points 85

My SQL at this point: (which gives me a "#Error" in datasheet view (Adjustment field). I haven't gotten to the division part yet. Position=Rank

SELECT [MajorScoreOrderingQ P2].[WGT Name], [MajorScoreOrderingQ P2].Position, (DSum("[MajorPosPts]","[MajorPtSystem]","[MajorsPosition]=[" & [Position])) AS Adjustment
FROM MajorPtSystem INNER JOIN [MajorScoreOrderingQ P2] ON MajorPtSystem.MajorsPosition = [MajorScoreOrderingQ P2].Position
GROUP BY [MajorScoreOrderingQ P2].[WGT Name], [MajorScoreOrderingQ P2].Position
ORDER BY [MajorScoreOrderingQ P2].Position;


any assistance is greatly appreciated and hopefully this doesn't constitute writing a book.
Scott Axton  @Reply  
        
4 years ago
The #Error usually is an indication that there isn't information in a field to be able to perform a calculation.

See the Calculated Fields and the NZ Function videos.
Darrin Hebert OP  @Reply  
     
4 years ago
Hi Scott, thanks for the tip, however I believe my issue is different than assuming a zero (or some other value).  While it may be true that the #Error suggests there isn't information in the Adjustment field, I'm trying to figure out why that may be.  Because the underlying queries all return the results I'm looking for.   I believe my issue may be in the use or the way I'm using DSum.

Is there anything I can share i.e. query results, table values, etc. that might aid in this troubleshooting?
Alex Hedley  @Reply  
            
4 years ago
Is this a typo: [MajorsPosition]=[
Darrin Hebert OP  @Reply  
     
4 years ago

Darrin Hebert OP  @Reply  
     
4 years ago

Darrin Hebert OP  @Reply  
     
4 years ago

Darrin Hebert OP  @Reply  
     
4 years ago

Darrin Hebert OP  @Reply  
     
4 years ago

Darrin Hebert OP  @Reply  
     
4 years ago

Darrin Hebert OP  @Reply  
     
4 years ago

Darrin Hebert OP  @Reply  
     
4 years ago

Darrin Hebert OP  @Reply  
     
4 years ago

Darrin Hebert OP  @Reply  
     
4 years ago
Hi Alex, No [MajorsPosition]=[ is not a typo, it is the criteria for my DSum... specifically, I'm trying to add the points for the golfers that have the same 'Rank'.
Kevin Robertson  @Reply  
           
4 years ago
Alex is right. You have an extra bracket that isn't needed.
In MajorScoreOrderingQ P3:

Adjustment: DSum("MajorPosPts","MajorPtSystem","MajorsPosition=" & [Position])
Alex Hedley  @Reply  
            
4 years ago
Prob not a good idea having spaces in your Query names too
Darrin Hebert OP  @Reply  
     
4 years ago
Thanks All, appreciate your help.   I mis-understood the question regarding the typo, indeed you were correct about the extra bracket.  thanks again.
Alex Hedley  @Reply  
            
4 years ago
Sorry for being vague, I like to get you thinking :p

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/22/2026 1:18:01 PM. PLT: 0s