Changing variable names

Results 1 to 2 of 2

Thread: Changing variable names

  1. #1
    Join Date
    Dec 1969

    Default Changing variable names

    How can I change a varible in a loop I need something like this but this does not work<BR>Dim i<BR>Dim Day1,Day2, Etc. Etc.<BR>For i = 1 To 28<BR> If Not rs.EOF Then<BR>Day & i= rs("Code")<BR>Else<BR> Day &i = ""<BR> End If<BR>next <BR><BR>Any help with this would be greatly apreciated. Been killing myself with this today.<BR>Thanks<BR>

  2. #2
    Join Date
    Dec 1969

    Default USE AN ARRAY!

    Dim Days(28)<BR>For i = 1 To 28<BR>&nbsp; &nbsp; If Not rs.EOF Then<BR>&nbsp; &nbsp; Days(i) = rs("Code")<BR>&nbsp; &nbsp; &nbsp; &nbsp; rs.MoveNext &#039; DON&#039;T FORGET THIS LINE!!!!<BR>&nbsp; &nbsp; Else<BR>&nbsp; &nbsp; Days(i) = ""<BR>&nbsp; &nbsp; End If<BR>next <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