Hello and welcome to our community! Is this your first visit?
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
    Thanked 0 Times in 0 Posts
    Thanks. I got it working by doing the following

        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
    Thanked 4,740 Times in 4,702 Posts
    If that's all your problem was, a better fix is just
         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.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

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

    hughesmi (08-12-2012)

Page 2 of 2 FirstFirst 12

Posting Permissions

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