SPONSORS:






User Tag List

Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    Jan 2002
    Location
    Windham
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Getting character values out of textfields

    What is the best way to verify how many text characters a text field can take?

  2. #2
    Junior Member
    Join Date
    Jan 2002
    Location
    Denver, CO
    Posts
    20
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Getting character values out of textfields

    I would suggest this:

    Do a SetText() on the field and intentionally put more characters in the field than you know it can handle. Then do a Len(GetText()) on the field and that will give you the maximum number of characters. 2 lines of code, quick & dirty, but it works.

    ------------------
    Paul Fountain
    QA Analyst/Engineer
    Sungard Insurance Systems
    Paul Fountain
    QA Analyst/Engineer
    Sungard Insurance Systems

  3. #3
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Getting character values out of textfields

    Just a pointer, silk can only hold 16k of character or so in a string, hence if your textfield is longer than that you need to find another way to test the length of your textfield.

    Actually why do you want to know the range of a textfield??

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

  4. #4
    Junior Member
    Join Date
    Jan 2002
    Location
    Windham
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Getting character values out of textfields

    Thanks for you help it works beautifully. I need to know the lengths of the fields as a business requirement.

 

 

Posting Permissions

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

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 03:59 AM.

Copyright BetaSoft Inc.