Set Value to nothing not "" or 0, nothing

Results 1 to 2 of 2

Thread: Set Value to nothing not "" or 0, nothing

  1. #1
    Join Date
    Dec 1969

    Default Set Value to nothing not "" or 0, nothing

    I have a could list box that actually are all dynamically populated based upon the one before it. Some times I need to set the final to nothing I tried GRP_PARENT_ID = "" but that gave the error Object required: &#039;[string: ""]&#039; I Also Tried GRP_PARENT_ID = null and GRP_PARENT_ID = neither worked.<BR><BR><BR>Here is some of my code<BR>set selList4 = Request.Form("selList4")<BR>set selList3 = Request.Form("selList3")<BR>set selList2 = Request.Form("selList2")<BR>If selList2 &#062; 0 then<BR> If selList3 &#062; 0 then<BR> If selList4 &#062; 0 then<BR> set GRP_PARENT_ID = selList4<BR> End If<BR> Else set GRP_PARENT_ID = selList3 <BR> End if<BR>Else set GRP_PARENT_ID = ""<BR>End if<BR>Thanks in advance...<BR>Jeremy

  2. #2
    Join Date
    Dec 1969

    Default Why are you using SET???

    You *ONLY* use SET when you are assigning an OBJECT REFERENCE to a variable.<BR><BR>In *none* of that code should you be assigning references, so dump *all* the SET keywords!<BR><BR>And then doing <BR>GRP_PARENT_ID = ""<BR>will work just fine!<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