I need to loop thru a series of data fields and be able to change the number with in the field name.
is. Q1T1, Q1T2, Q1T3,Q1T4, Q1T5, Q1T6,
Q2T1, Q2T2, Q2T3.Q2T4, Q2T5, Q2T6,
Q3T1, Q3T2, Q3T3,Q3T4, Q3T5, Q3T6,
Q4T1, Q4T2, Q4T3,Q4T4, Q4T5, Q4T6,
Q5T1, Q5T2, Q5T3.Q5T4, Q5T5, Q5T6,
Q6T1, Q6T2, Q6T3,Q6T4, Q6T5, Q6T6,
Total of 36 fields that I will need to be able to capture the value so that I may compare it to another value to see which is greater.
So I want to simplify this by using a variable for the 2nd position and 4 position. What is the best solution.
I will need to be able to increment the numbers to compare the value of
Q1T1 > Q1T2
Hence the need to Q1T & (i) + 1 = Q1T2, etc.
This is my first attempt.
While rs.EOF = False
For nQtr = 1 To 6
For ntr = 1 To 6
i = "Q" & nCt & "T" & ntr
n = 1 + 1
If rs.Fields("Q" & CStr(i)).Value = True Then