The following code is a partial implementation of a function that creates a recordset based on a query. When the query runs independently, there are 127 records found. Yet, when I run the code in debug mode and check the value of "iRow" at the "jCol = " statement , its value is one (1). iRow and iCol are global to the module. What am I missing?
Function LoadGroup_ALL()
'*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* =*=*=*=*=*=*=*=*=*=*
' Load up the rsGrpALL recordset, allocate and load the names and numbers in the BCarray. *
'*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* =*=*=*=*=*=*=*=*=*=*
Dim rsGrpALL As DAO.Recordset
Dim iWork As Integer
Dim jWork As Integer
Set rsGrpALL = DBEngine(0)(0).OpenRecordset("QBroadcastGroupALL")
iRow = rsGrpALL.RecordCount
jCol = iGroups + 5
ReDim strBCarray(iRow, jCol)
iWork = 1
jWork = 1
rsGrpALL.Close
Set rsGrpALL = Nothing
End Function