Results 1 to 3 of 3

Thread: arrays and recordsets

  1. #1
    Join Date
    Jun 2003
    Location
    Bloomington, IN, USA
    Posts
    116

    arrays and recordsets

    Ok, I have an array named AffArray(1 to 3). Its value is:
    AffArray(1) = "rst!Affiliated_Number_1"
    AffArray(2) = "rst!Affiliated_Number_2"
    AffArray(3) = "rst!Affiliated_Number_3"

    I have a loop set up with a counter variable, and I am trying to set something equal to the value of AffArray as controlled by the counter variable.
    exe: loopvar = 2
    AffArray(loopvar) = *sum-stuff*
    would be trying to set rst!Affiliated_Number_2 equal to *sum-stuff*

    However, when I try that, it just resets the string value of AffArray(loopvar) to whatever *sum-stuff* is.
    How do I get it to change Affiliated_Number_2?

    Brandon

  2. #2
    Join Date
    Sep 2002
    Location
    Fantasy
    Posts
    4,254
    I really dont understand what you really want here. anyway see the below code.


    Dim AffArray(3) As String

    AffArray(0) = "rst!Affiliated_Number_1"
    AffArray(1) = "rst!Affiliated_Number_2"
    AffArray(2) = "rst!Affiliated_Number_3"

    MsgBox AffArray(2)
    AffArray(1) = "test"
    MsgBox AffArray(1)

  3. #3
    Join Date
    Sep 2002
    Location
    Fantasy
    Posts
    4,254

Posting Permissions

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