-
Hi there.
I have a problem, here is my code:
Code:
Private Sub Grid1_KeyPress(KeyAscii As Integer)
Grid1.Text = Grid1.Text & Chr(KeyAscii)
End Sub
every time i press the backspace button "chr(8)" it ads an vertical bar insted of erasing the last charecter, can someone help me out?
numibesi
-
Code:
Private Sub Grid1_KeyPress(KeyAscii As Integer)
If KeyAscii > 31 then Grid1.Text = Grid1.Text & Chr(KeyAscii)
End Sub
This will allow all control characters
-
Hmm
You'll probably also need this:
Code:
If KeyAscii = 8 then
Grid1.Text = Left(Grid.Text,Len(Grid1.Text) - 1)
End If
-
That´s not he problem
The problem is that when i need to erase the last imputed character using the Backspace button it doesn´t work using your code, or it imputs an vertical bar charater using my code.
numibesi
-
Sorry
Sorry marnitz,
it does work now thank you marnitz, i was replying at the time so i didin´t saw your post. Thx
numibesi
-