to put the IDs into an array...(untested code)
dim db as database
Dim rs as dao.recordset
Dim MyIds as variant
set db = currentdb
set rs = db.openrecordset("Select ID from tablename where yesnofield = true")
myIds = rs.GetRows(1000000) ' any number more than the max number you might get
rs.close
set rs= nothing
set db = nothing
' you now have an array of ids in MyIDs - for testing use the next line to show how many
msgbox ubound(myids)+1 '