Your post is rather confusing. Where do you want to fill the array? Are you trying to run code within the report to fill the array? Why would you need the report to fill the array? Can't you just open the recordset (table or query) that is used to generate the report and get the parentid from that recordset?
e.g. code something like this:
Code:
Dim db as database
dim rs as recordset
dim i as integer
set db = CurrentDB()
set rs = db.openrecordset("the_table_or_query_that_the_report_uses")
i=0 ' don't you want to start your array at 0 not 1?
While not rs.eof
myarray(i)=rs!parentid
i = i + 1
rs.movenext
wend
rs.close
Why are you filling the array anyway? What will you use it for after it is filled?
Randall J Weers
Membership Vice President
Pacific NorthWest Access Developers Group
http://www.pnwadg.org