I'm reading a table and steping through each row. I have declared two dynamic arrays. While trying to populate the arrays I'm getting Subscript out of Range. Please help.
Option Compare Database
Option Explicit
Sub FindTiers()
Dim db As Database
Dim rst As Recordset
Dim lsEntity() As String
Dim lsOwners() As String
Dim intI As Integer
Dim intRecords As Integer
Set db = CurrentDb()
Set rst = db.OpenRecordset("tbl_TranslationIncomeApplication"
intRecords = rst.RecordCount
For intI = 0 To intRecords
lsEntity(intI) = rst![ProjectPrefixOwned] 'Error here
lsOwners(intI) = rst![ProjectPrefixOwner] 'Error here
rst.MoveNext
Next intI
End Sub
Option Compare Database
Option Explicit
Sub FindTiers()
Dim db As Database
Dim rst As Recordset
Dim lsEntity() As String
Dim lsOwners() As String
Dim intI As Integer
Dim intRecords As Integer
Set db = CurrentDb()
Set rst = db.OpenRecordset("tbl_TranslationIncomeApplication"
intRecords = rst.RecordCount
For intI = 0 To intRecords
lsEntity(intI) = rst![ProjectPrefixOwned] 'Error here
lsOwners(intI) = rst![ProjectPrefixOwner] 'Error here
rst.MoveNext
Next intI
End Sub