I built a query called qryStudCount, based on two tables tbleStudents and tbleSections. Students are assigned to Sections. The queryStudCount shows how many students are enrolled in each Section.
For example, if there are two sections, Alpha and Bravo with 4 and 7 students, respectively, the query table shows these counts.
How can I display these numbers for a specific section in a field in a form? I used this expression in the control source for a field called studCount and can't get the correct count to display for either Alpha and Bravo
=DLookUp("CountOfstudentNo","StudCount""[????]")
Is the problem in the parameter field and how this should be written? Without the parameter, the expression returns a number, but not specific for the section.
By the way, in the form is another field for sectionName, which is also a field in the query. Do I need to establish a relationship between these fields in the form and query? How?
Many thanks for any help I can get.