Access 2003 VBA
I want to create an array where each index has three elements. I have the following code to load the array:
DIM arrAssessors(2) as string
strSQL = "SELECT x, y, x from myTBL"
rst.Open strSQL, Cnxn, adOpenKeyset, adLockOptimistic
' Put Data into Array
initRecords = rst.RecordCount
arrAssessors = rst.GetRows(initRecords)
Is this correct?
Then how do I retrieve the values? I have the following code:
For x = 0 To initRecords - 1
strTheYear = arrAssessors(0, x)
strTheState = arrAssessors(1, x)
strTheAssessor = arrAssessors(2, x)
MsgBox (strTheAssessor & strTheYear & strTheState)