Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recordcount of a subFrm ? 1

Status
Not open for further replies.

Bresart

Programmer
Feb 14, 2007
314
ES
Hi, one of the forms in a DB is a popup simple one with a child continuous subform. A textbox in the parent form must show the records number there is in the subform not only in the shown main record but in all main records.

With the control source property of the textbox set to:

=[Forms]![frmName].[secControl].[Form].[RecordsetClone].[RecordCount]

the textbox shows only the number of records in the subform in the current main record, but not the number of records in the subform in all main records. Also, when browsing to another main record thet textbox shows #Error.

Any idea for going around that?

Thank you.
 
Have a look at the DCount function.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thank you PHV. It works with control source property set to:

=DCount("[anyfieldname]";"tablename";"[visible]=Yes")

being the last argument any selection criteria for that table.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top