var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Counting records in a sub-form.
How can I count the number of records in a sub form (from within the parent form), whose record source is a query? Ideally I need to do it through code. I can't seem to find a way using RecordCount or RecordSetClone.
When you are in parent form, for particular parent record, Sub form's records are getting changed. Because there is a relationship.
There are certain fields are passed to sub form to pull certain records in subform.
Write a following code in parent form.
Dim DB as database
Dim RS as recordset
Dim SubformRecords as integer
Set DB = currentDB
Set RS = DB.Openrecordset("select count(*) from Subform_table_query
where parameter_filed = Me.field")
SubformRecords = RS(0)