Stangleboy
Programmer
I have been through several posts on the site searching for a code to count the number of records in a SubForm and display in a field on the main form. There are several posts but they are parts and pieces of bigger code. I wrote a simple piece of code on the display field on "Got Focus", but it errors out on me.
Me.[Subform Control Name].Form.Recordset.RecordCount
The form is called "frm_Course" and the subform is called "frm_SubEmpl" also the primary field in the subform is "EmpID" if needed.
I even tired,
=Count([Me!frm_SubEmpl!EmpID]) in the field on the main form itself but error'ed out again.
Any help and time in this would be great assistance, also when replying please just do not post "Use the so-and-so command", please provide example with the data above, that saves me alot of time, thank you.
Me.[Subform Control Name].Form.Recordset.RecordCount
The form is called "frm_Course" and the subform is called "frm_SubEmpl" also the primary field in the subform is "EmpID" if needed.
I even tired,
=Count([Me!frm_SubEmpl!EmpID]) in the field on the main form itself but error'ed out again.
Any help and time in this would be great assistance, also when replying please just do not post "Use the so-and-so command", please provide example with the data above, that saves me alot of time, thank you.