vba - Loop through subrecords in MS Access -


i've got nested datasheet, bar child of foo.

to loop through records of foo, do

dim rst dao.recordset set rst = forms!foo.form.recordsetclone  until rst.eof     'do     rst.movenext loop 

but want loop through records of child form bar. tried

dim rst dao.recordset dim subrst dao.recordset set rst = forms!foo.form.recordsetclone  until rst.eof     set subrst = forms!foo.form!bar.form.recordsetclone      until subrst.eof         'do         subrst.movenext     loop rst.movenext loop 

sadly loops through subrecords of first record. other subrecords never reached. how access recordset of other subrecords?

the relation have subrecords belonging current (visible) record of parent record.

to retrieve remaining subrecords, either move record on main form (use bookmark) or open recordsource of subform , loop filtering on key of parent record in current loop (of "foo").


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -