G
Guest
Hi.
With help from this Discussion Group, I have set up a way of counting
records in various Report sections. This works fine but I’ve just noticed
that it includes, in the count, records where there is no data in the
relevant section. Can this be modified so that it only counts records where
data is present?
Here’s some detail. My report has three sections, StaffID Header, SchoolID
Header and StudentID Header. In the StaffID Header I have an invisible text
box called txtCountOfStaffMembers, with control source set to =1 and Running
Sum set to Over All. In the reports footer I have a text box with control
source set to =[txtCountOfStaffMembers] which shows the count of Staff
Members.
As I say, when data is shown in the SchoolID and StudentID sections but no
Staff member name appears in the StaffID section (because one hasn't been
allocated), this is still included in the count of staff members. Is there a
way of changing the code to count only those records that have a Staff member
name appearing in the StaffID Section? Apart from the invisible text box, the
StaffID Header section has only one text field, called txtStaffName.
Thanks, JohnB
With help from this Discussion Group, I have set up a way of counting
records in various Report sections. This works fine but I’ve just noticed
that it includes, in the count, records where there is no data in the
relevant section. Can this be modified so that it only counts records where
data is present?
Here’s some detail. My report has three sections, StaffID Header, SchoolID
Header and StudentID Header. In the StaffID Header I have an invisible text
box called txtCountOfStaffMembers, with control source set to =1 and Running
Sum set to Over All. In the reports footer I have a text box with control
source set to =[txtCountOfStaffMembers] which shows the count of Staff
Members.
As I say, when data is shown in the SchoolID and StudentID sections but no
Staff member name appears in the StaffID section (because one hasn't been
allocated), this is still included in the count of staff members. Is there a
way of changing the code to count only those records that have a Staff member
name appearing in the StaffID Section? Apart from the invisible text box, the
StaffID Header section has only one text field, called txtStaffName.
Thanks, JohnB