Access Acs Function problem

The code in the Access form was working now it doesn't . When the button "Character" is pressed and you have entered a legitimate character code in the text box such as "42" you should get  ( * ) the asterick  character.

Now if you enter 42 you get 52 which makes no sense. It was working and now it won't. Can someone take a look at this please. I have been trying for a long time but can't seem to fix it.
AccessDB-Asc.accdb
James CoatsComputer Info. Sys. StudentAsked:
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.

Rey Obrero (Capricorn1)Commented:
use these codes

Private Sub cmdCharacter_Click()

Dim intInput As Integer
    intInput = CInt(txtInput.Value)
  lblOutPut.Caption = Chr(intInput)
 
End Sub
0

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
James CoatsComputer Info. Sys. StudentAuthor Commented:
Rey,

Thank you for answering so quickly. Don't you ever take time off?

I don't understand why my code quit working. What is wrong with it?

I understand the "Chr(input)" but what is the "CInt" ? I have not seen this before as you used it here "CInt(txt.Input.Value)

Thank you very much!
0
IrogSintaCommented:
I don't see how your code could have worked before since you were using the ASC function which gives you the ASCII value for you character.  When you entered 42, the expression ASC("42) just evaluates the 1st character it encounters... in this case, it's really evaluating ASC("4"), and of course the ASCII value of 4 is 52.

On a side note, you seem to have a tendency of closing your questions and accepting an answer even though you haven't received responses to all your questions.  Are your follow up questions just rhetorical in nature so that you don't care if you get an answer to them?
:-)

Ron
0
James CoatsComputer Info. Sys. StudentAuthor Commented:
IrogSinta,

I must have changed something, saved it and not have been aware of doing that. It  did work at one time. I just didn't recognize that the code had changed.

The follow up questions are important to me.  I won't learn if I don't understand. I will wait in the future till I get the answer to my questions.

Sam
0
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 Access

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.