One final question!

Results 1 to 4 of 4

Thread: One final question!

  1. #1
    Susan One Last Time Guest

    Default One final question!

    Alright! I have learned a lot today and need to learn one more thing!<BR><BR>I am now doing this:<BR><BR>if IsNumeric(var) and IsNumeric(var2) Then<BR>&#039 Do a whole bunch of stuff<BR>Else<BR>&#039 Do an error<BR>End if<BR><BR>The problem I have having is, it is ok for var and var2 to be empty, but if they are not empty, they can not contain any characters. Right now if they are empty they are not numeric.<BR><BR>Suggestions? :)<BR><BR>Thanks!

  2. #2
    Join Date
    Dec 1969

    Default RE: One final question!

    Try this...<BR><BR>if IsNumeric(var) or var = "" and IsNumeric(var2) or var2 = "" Then<BR>&#039 Do a whole bunch of stuff<BR>Else<BR>&#039 Do an error<BR>End if<BR><BR>

  3. #3
    Join Date
    Dec 1969

    Default RE: One final question!

    That doesn&#039t seem to work:<BR><BR>If IsNumeric(var) or var="" and IsNumeric(var2) or var2="" Then<BR>&#039 do stuff<BR>else<BR>&#039 do error<BR>End if<BR><BR>In my case with var=char and var2="", it went thru without an error.<BR><BR>If either both var and var2 are characters, or var2 is characters and var is empty, it works. Do I need any ()&#039s?

  4. #4
    Skippie Guest

    Default I know the trick!

    This is a simplified example and it may or may not pertain to<BR>your problem.<BR><BR><BR>In ASP, sometimes the following doesn&#039t work:<BR><BR>&#060;%<BR>If s = "" Then<BR>** do something **<BR>End If<BR>%&#062;<BR><BR>However, (I know it looks clunky) this will ALWAYS work:<BR><BR>&#060;%<BR>If s &#060;&#062; "" Then<BR>Else<BR>** do something **<BR>End If<BR>%&#062;<BR><BR>I do this all the time, and I NEVER have a problem regardless<BR>of the datatype. <BR><BR><BR>-- Skippie<BR><BR>

Posting Permissions

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