Report Control Source Formula

  • Thread starter Thread starter Mathew Winder
  • Start date Start date
M

Mathew Winder

I have a report whose record source pulls in data about my company's course
offerings.

I would like one of the text boxes on the report to display a calculation of
the total number of contact hours for a course: course contact hours
multiplied by the total number of students in the course. Both the course
contact hours and number of students fields are part of the record source,
however I've been unable to figure out the proper syntax for the control
source to multiply the two numbers together.

Is something like this even possible? Am I going about this the wrong way
altogether?

Any help would be much appreciated.
 
I've got it figured out how I can do this with the report controls, though
I'm still curious what the VBA code for something like this might look like
if anybody's up to it.
 
Mathew said:
I've got it figured out how I can do this with the report controls, though
I'm still curious what the VBA code for something like this might look like
if anybody's up to it.


Using VBA code to calculate an aggregate of values across
multiple detail records is not something to mess around
with. It could be done in the report's record source query,
but is much easier to do with text box expressions in the
report and/or group header or footer sections.
 
Back
Top