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.
James CoatsComputer Info. Sys. StudentAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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

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:

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!
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?

James CoatsComputer Info. Sys. StudentAuthor Commented:

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.

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.