Removing the leading spaces from variables

Results 1 to 2 of 2

Thread: Removing the leading spaces from variables

  1. #1
    Join Date
    Dec 1969
    Posts
    119

    Default Removing the leading spaces from variables

    I want to collect data in text boxes, but I fear someone may just put in blank spaces. Certainly I don&#039t want a record to be created with blank field value. How can I do this? Can this be done at the time of reading variables from text box, or it is to be done at the time of record insertion?<BR>Please help.<BR>Arvind

  2. #2
    Join Date
    Dec 1969
    Posts
    21

    Default RE: Removing the leading spaces from variables

    You can always use LTrim() on the variable to remove leading spaces. Using Trim() will eliminate leading AND following spaces.<BR>Then check if the variable IsEmpty() or IsNull() - if not use it.<BR><BR>The other way is to use a client-side form validator which includes a blank space checker - If you want I can post a copy of mine.<BR><BR>Hope this helps, Ric

Posting Permissions

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