DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Text Boxes

  1. #1
    Join Date
    Aug 2004
    Posts
    43,023

    Text Boxes

    [Originally posted by Samantha Rodrigs]

    I have to enter data in text boxes for updating
    in the database. Hoever I just found a bug
    for eg.
    rs!name = txtname.text
    rs!number = txtnumber.text
    rs!add = txtadd.text
    The first field is mandatory. The second two
    text boxes need not be filled in
    Now when i want to add number or add in the text
    boxes, i think it is assigning blank spaces to the
    text boxes and i press to delete button a few times
    before i can enter data. Can somebody please help
    me to get rid of blank spaces in the text box
    thanks

  2. #2
    Join Date
    Aug 2004
    Posts
    43,023

    Re:Text Boxes

    [Originally posted by Ed Ardzinski]

    You could try to use the Trim function...

    rs!Field = Trim(Text1.Text)

    This should remove the space characters and enter an empty string to the DB field (maybe Null???).

    I just got authorized at work to get VB 6.0, so unfortunately I can't test it for you now, but the trim function should help.

    If the first field is mandatory, it's a good idea to write some code blocking the update routine until that field is filled...

  3. #3
    Join Date
    Aug 2004
    Posts
    43,023

    Re:Text Boxes

    [Originally posted by Peter]

    WRAP THE TEXT BOXES IN A TRIM FUNCTION

    rs!name = TRIM(txtname.text)



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center