Converting Letters to Number value in Access Query

Dear Experts,

I am creating a chart based off of query values. One column is of letters, i.e. A,B,C,D, etc.

The problem I am running into is trying to graph those values. If a student receive a 'B' I'd like the column chart to reflect that on the y axis. So y axis would have from the bottom A to G for example. The x axis has student name. I can do this if the some how the LETTERS were numbers then I could represent numeric value on the y axis (of course not sure how I could create the  ALPHA labels on the y-axis.
Does anyone have any experience with this?


Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You can use the ASCII values of the letters.

The ASCII values for your upper case letters start with 65.

You can get the ascii value like this:

Msgbox ASC("A")

If you want to have numeric representations of your letters, starting from 1, you can do this:

x = ASC("A")  - 64

Or using a string variable for your letter:

x = ASC(strLetter)  - 64
shogun5Author Commented:
How can I used this in a query. I keep getting an error message. See attachment.
Looks like you are missing a bracket.

 Asc([Bas Boy])

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Newly released Acronis True Image 2019

In announcing the release of the 15th Anniversary Edition of Acronis True Image 2019, the company revealed that its artificial intelligence-based anti-ransomware technology – stopped more than 200,000 ransomware attacks on 150,000 customers last year.

To have the letters A, B, C, D show up on the Y scale of a chart isn't that easy if you want it to be automated.  In a vertical bar chart, the Y-axis needs to be numerical in order to know where the end points are for each member of the data set, in this case, your students.  

If you have a another field showing their WeightedScore aside from the LetterGrade field, you can use the new field for the Y-axis and come up with something like this:
shogun5Author Commented:
Wow! Thanks. Yep missed that one. Do you know how I would display 65 (B) as 'B' on the y axis of a chart?
shogun5Author Commented:
Thanks! I am going to post another question in regards to the y-axis conversion 'challenge'
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Office

From novice to tech pro — start learning today.