Field from one form displayed on another form (1 Viewer)

DaveG

New member
Local time
Today, 10:35
Joined
Mar 30, 2011
Messages
8
Hope someone can assist as this has me going around in circles.

frmClasses has a sub form called frmClassesSubform

frmClassesSubform has in footer unbound text box called CountRecords containing =Count(IIf([bookedstatus]="Confirmed",0))
This produces a figure indicating how many people have "confirmed" their booking. (bookingstatus is field within Subform where options are Confirmed, Cancelled)

frmClasses has unbound text box called booked containing =frmClassesSubform.Form!CountRecords This displays the contents of CountRecords within footer of Subform.

They above works well and have no problem with it. But here is the bit I am having big problems with.

I have another form called frmCourseList that I'd like to include the contents of either bookingstatus or CountRecords so that the number of people booked is part of each record line.

Did try query containing all fields from Classes table and two fields from students table that has the booked (containing Confirmed or Cancelled options) field, then with query used Count and then Where =Confirmed

This works, until there is no Confirmed remaining within any given course then the course disappears from the form (frmCourseList), guesss because there is no longer any Confirms to count! If I remove the Where then it counts both Confirmed and Cancelled thus giving incorrect result.

So looking for any guidance on how to display contents of one field on one form on another form. In this case the field booked from frmClasses onto frmCoursesList

If you've got to this part, thanks for reading

Dave
 

Users who are viewing this thread

Top Bottom