Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 2 of 2 FirstFirst 12
Results 16 to 17 of 17
  1. #16
    Regular Coder
    Join Date
    Jul 2002
    Location
    UK
    Posts
    302
    Thanks
    16
    Thanked 0 Times in 0 Posts
    Thanks. I got it working by doing the following

    Code:
        If IsNull(NumberProvider) OR IsEmpty(NumberProvider) OR Len(NumberProvider)=0  Then Exit For
    Kind regards,
    Mike Hughes

  2. #17
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    29,353
    Thanks
    83
    Thanked 4,904 Times in 4,865 Posts
    If that's all your problem was, a better fix is just
    Code:
         NumberProvider = Trim( Request.Form("NumberProvider" & row) )
         If Len(NumberProvider) = 0 Then
    TRIM() guarantees that you will get a NON-empty, NON-null value. If the form value really was empty or null, it converts it to a "" string. So now you can just ignore the empty and null test and check for the empty (length zero) string.

    In general, it's a good idea to use TRIM() on all human input. Humans do often put a space before or after their values, often by accident. So TRIM() tends to fix many problems easily.
    Be yourself. No one else is as qualified.

  3. Users who have thanked Old Pedant for this post:

    hughesmi (08-12-2012)


 

Posting Permissions

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