Report Control Source Formula

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.
 
M

Mathew Winder

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.
 
M

Marshall Barton

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top