Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Where to put edits in an editable Flex Grid

Status
Not open for further replies.

swade61970

Programmer
Apr 2, 2003
19
0
0
US
I have an editable Flex Grid with several columns. I want to put logic in the program to keep the user from entering alpha chars in some of the columns. I want the program to not accept alpha chars from the keyboard. So where do I put the logic in to send the backspace when this happens?

 
I'd use the KeyPress event and just do a Select Case on KeyAscii:

Select Case KeyAscii
Case 8, 46, 48 To 57 ' allows BS, Dec point and numbers only
Exit Sub
Case Else
KeyAscii = 0
Beep
End Select


________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top