Results 1 to 2 of 2

Thread: KeyAscii in KeyPress event

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 1999
    Posts
    1

    Post

    I am trying to code a textbox to only accept e-mail addresses.

    I am using the "If KeyAscii =" code, and I know it needs to accept backspace, decimal, upper and lower case letters, numbers, "@" and _, and can't get it to work.

    Can anyone help?

    Myemmy
    [email protected]

  2. #2
    Guest

    Post

    why bother using the keyascii, when you could check the email in the LOST FOCUS event, this would free up the processor more...

    use something like:

    If Not LCase(Text1.Text) Like "*@*.*" Then
    'put code her to display an error message because the email is not a valid one.
    End If


    mail me if you want a working sample

    ------------------

    Wossname,
    Email me: [email protected]

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