Results 1 to 5 of 5

Thread: deleting special chracters

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2002
    Location
    VISAKHAPATNAM
    Posts
    8

    Cool deleting special chracters

    hi guys,

    i am having a problem in designing logic for the following problem

    "I am havig a data entry form . when ever user enters the data it needs to check for special these characters ' & " ". When it finds it shld be deleted automatically i mean thru code itself"

    if any body can help me out it will be great help

    thanks in advance to vb guys

    kalyan
    kalyan

  2. #2
    Member
    Join Date
    Sep 2001
    Location
    Hyderabad
    Posts
    47
    u can use Replace function to replace characters.

    example:

    To replace & in a string str u have to use
    str=replace(str,"&"," ")
    Pavan kumar

  3. #3
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431
    VB Code:
    1. Private Sub Text1_KeyPress(KeyAscii As Integer)
    2.  
    3.     Select Case Chr(KeyAscii)
    4.         Case "&", "'", " "
    5.             ' An ampersand, apostrophe or space was entered
    6.             KeyAscii = 0
    7.     End Select
    8.  
    9. End Sub

  4. #4
    Member
    Join Date
    Sep 2001
    Location
    Hyderabad
    Posts
    47
    to delete double codes u have to use like this


    str=replace(str,""""," ")
    Pavan kumar

  5. #5

    Thread Starter
    New Member
    Join Date
    Dec 2002
    Location
    VISAKHAPATNAM
    Posts
    8

    thanxs

    thaxs for all u guys for u r replies
    kalyan

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