By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,247 Members | 2,145 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,247 IT Pros & Developers. It's quick & easy.

Decimal Ascii values

P: 143
Hello All,

I have a table in my database with a field itemqty and the type was int and need to change it to decimal as i need the decimal point in my textbox.. i have a code for integer ascii values as bellow
i want to change this code and whtever i m doing my values is coming wrong coz i want both integer as well as decimal point ascii values.
can anyone help me in my code.
thank u in advance

Expand|Select|Wrap|Line Numbers
  1. Private Sub txtItemQty_KeyPress(KeyAscii As Integer)
  2. On Error GoTo ChkErr
  3. If Chr(KeyAscii) Like "[!0-9]" And KeyAscii <> 8 Then
  4.          KeyAscii = 0
  5.     End If
  6. Exit Sub
  7. ChkErr:
  8.     If Err.Number > 0 Then
  9.     MsgBox Err.Number & vbNewLine & Err.Description
  10.                Call ErrHand(Me.caption, "Form_Initialize")
  11.         'Resume Next
  12.     End If
  13. End Sub
May 21 '09 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.