Alawagi71 -
To make this work, put a text box on your main form, and rename this text
box to be txtRecCount by putting that in the Name property of the text box.
Now you have a control (a text box) named txtRecCount on your form. That
means anywhere in the code for the form Me.txtRecCount can be used to
reference that text box.
Now to put the record count into that field, you need to know the name of
the table that your subform is based on. Change the TableName in the
statement below to be your table name. Also change the KeyFieldName to be
the name of a field in that table that is always populated - we usually use
the field that is the key to the table, but for this purpose I would use the
name of the field that you used to join the form to the subform. Finally,
change the Me.ControlWithKeyFieldName to be the control on the main form that
contains this field.
Me.txtRecCount = DCOUNT("[KeyFieldName]", "[TableName]", "[KeyFieldName] = "
& Me.ControlWithKeyFieldName)
If you want more help, you have to provide more details - what are the table
names and the main field names for the tables, and what are the names of the
controls on your form where the key value is and where you want the record
count to go.
[quoted text clipped - 24 lines]