Results 1 to 5 of 5

Thread: Backspace in Text boxes?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2000
    Posts
    84

    Question

    I was just wondering why the Delete key (DEL) works in text boxes...... but the Backspace key does not..

    Is there anyway to enable the backspace key in textboxes, or make it work?

    I don't see a backspace key reference on the ASCII chart I have..

    Thanks for any info


  2. #2
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    It should work.
    Harry.

    "From one thing, know ten thousand things."

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Oct 2000
    Posts
    84
    Ack! I figured out why - but not how to fix it!

    I'm using a "NON-Number-key" filter on all the textboxes:

    Private Sub GameMax_KeyPress(KeyAscii As Integer)
    If IsNumeric(Chr(KeyAscii)) <> True Then KeyAscii = 0
    End Sub


    How could I check for a backspace keypress to fix this?

  4. #4
    Guest
    The backspace is ASCII character 8. Use a select case instead:

    Code:
        Select Case KeyAscii
            Case 48 To 57 'Numbers
            Case 8 ' Backspace
            Case 10 'Linefeed
            Case 13 'Carriage return
            Case Else
                KeyAscii = 0
        End Select
    - gaffa

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Oct 2000
    Posts
    84
    Thanks.... Thants new to me.

    Works great

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width