Results 1 to 3 of 3

Thread: Detecting negative number in textbox?

  1. #1

    Thread Starter
    Addicted Member CoMMiE's Avatar
    Join Date
    Jul 2000
    Location
    Malaysia, Kuala Lumpur
    Posts
    179

    Thumbs up

    Hi
    How do i write a if..else statement so that it can detect any negative number that is present in a textbox?


    Thanks in advance

  2. #2
    Guest
    The following is possible, though probably not very efficient:

    1. Search for "-"
    2. Take the string from "-" to " " or the end of the line, whichever applies.
    3. Walk through the string testing for IsNumeric(character)

    4. If all are numeric....Voila!


    Good Luck
    DerFarm

  3. #3
    Addicted Member tonyenkiducx's Avatar
    Join Date
    Oct 2000
    Location
    London England
    Posts
    147
    If Int(OBJECT.TEXTBOX.VALUE)<0 then

    End If

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