Dynamic Variables

Results 1 to 2 of 2

Thread: Dynamic Variables

  1. #1
    Join Date
    Dec 1969

    Default Dynamic Variables

    Below is a small snippet of code ...<BR><BR>searchOp1 = Request.Form("searchOp1")<BR>If trim(searchOp1) = "" Then<BR> searchOp1 = Request.QueryString("searchOp1")<BR> If trim(searchOp1) = "" AND reset &#060;&#062; "Y" Then<BR> searchOp1 = "N"<BR> Else<BR> searchOp1 = "Y"<BR> End If<BR>End If<BR><BR><BR>Now I have 12 of these, each being called "searchOp" then the number.<BR><BR>Is there anyone that knows how I could do a For Loop and set each of these variables using that, instead of writing this into my code 12 times?<BR><BR>Thanks in advance

  2. #2
    Join Date
    Dec 1969

    Default an array

    search for arrays on 4guysfromrolla.com...<BR>your syntax will look like <BR>For I = 0 to 11<BR>SearchOp(I) = "Y"<BR>Next...<BR><BR><BR>Jason<BR>http://www.jasontconnell.com

Posting Permissions

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