Does anyone have any idea what this Asc function is doing (-64)? Thanks again in advance.
Access – IIF(Trim(NZ(MCATw)) = “”, 0, Abs(Asc(UCase(MCATw)) -64)) as MCATwNo
I don’t understand what the -64 is doing?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It’s probably converting the first letter of a string to a numeric value 1-26. The upper case letters A – Z have ASCII values of 65 – 90, so
ASC("A")becomes 65, and 65 – 64 is 1. Thus A – Z becomes 1 – 26. Assuming thatMCATwis a string,ASCwill only apply to the first character.