Referencing subform recordsets

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to access the recordset of a subform on an active form using a
string. Then active form may not always be the same.
When I try the following code, access reports that it cannot find the form

Forms(frmName).Recordset.RecordCount

But when I reference it directly it works

Form_OldGroupsList.Recordset.RecordCount

but if i use this method it does not allow dynamic access

Amiga1200
 
Asked and answered in FormsCoding. Please don't post separate messages in
multiple groups. If you want to post in multiple groups, please address all
the groups in a single message so that the replies also go to all of the
groups.
 
amiga1200 said:
I am trying to access the recordset of a subform on an active form using a
string. Then active form may not always be the same.
When I try the following code, access reports that it cannot find the form

Forms(frmName).Recordset.RecordCount

But when I reference it directly it works

Form_OldGroupsList.Recordset.RecordCount

but if i use this method it does not allow dynamic access


Please don't post the same question to multiple newsgroups.
I you feel that your question requires it, you might cross
post it to a couple of groups by using both group in the To:
list of a single message.

I responded to this question in the formscoding group.
 
Back
Top