Hi. In the code you have posted, rsora1 has not been populated with any values. Could you post the code where val_arr is declared and assigned a value?
here i populate rsora1:
rsora1.Open "select rowid,CUSTOMER_ID,ITEM_NO,ITEM_DESCRIPTION,BEGIN_D ATE,END_DATE from XXITEM_MAP_TABLE where CUSTOMER_NO = " & cust_no, cnOra, adOpenForwardOnly (cust_no is a variable containing a value)
these are the array values:
a(0) = "CUSTOMER_ID"
a(1) = "ITEM_NO"
a(2) = "ITEM_DESCRIPTION"
a(3) = "BEGIN_DATE"
a(4) = "END_DATE"
i use a loop to get the specific value from the array:
For i = 3 To 13 Step 2
val_arr = a((i - 3) / 2)
now i do this:
If Worksheets.Item("sheet1").Cells(j + b, i).Value <> rsora1![val_arr] Then.....
but i can't get rsora1![val_arr] to point to a particular value in the resultset.
help me!!