Trying to Count Records in Subform

Joined
Dec 10, 2008
Messages
5
Reaction score
0
This is making me crazy! I have a subform SubfrmResEntityPers on a main form frmResSupportEntities2.

I want to display a count of the number of records in the subform, on the subform. I created a textbox control and in the Control Source of this control (txContResConts) put the following code:

=SubfrmResEntityPers.form.RecordsetClone.RecordCount

I have tried everything from adding parenthesis and brackets to putting the entire path:

=Forms!frmResSupportEntities2!SubfrmResEntityPers.form.RecordsetClone.RecordCount

but no matter what I do, Access always returns the following error:

Syntax error (missing operator) in query expression '='
- and shows #Name in the form view of the control.

I can not for the life of me figure out why it is doing this. Help!
 
Counting Records in Subform

OKAY, this is So-o-o-o-o my bad....

I discovered that in the midst of countless flips between views, I somehow entered a '=' under the Filter property of the form! Evidently that made it not-see the '=' in the expressions I've been trying, which seemed evident though until now inexplicable.

btw: the expression that I finally used was:
=Forms!frmResSupportEntities2!SubFrmResEntityPers.Form.RecordsetClone.RecordCount

=SubFrmResEntityPers.Form.RecordsetClone.RecordCount appears to be insufficient to do the count expression on the subform (which, btw, is on the second page (pg index 1) of a tab control).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top