Report totals

Teri Bridges

Member
Local time
Today, 08:25
Joined
Feb 21, 2022
Messages
187
Guys I am going to give it my best shot explaining what I am doing and what my issue is.

My database has a form for Lessons, and that form has a sub form for events.

The lesson has a duration say .25 (15 minutes)

I created a query to show me my lessons and associated events so I could make a report.
So what is happening is, in the query if I have three events in the lesson, say lesson 1 the duration is showing 3 times so it thinks the lesson duration is .75 .

When I run the report each lesson has the correct lesson duration but when I create the sum field for the duration it is pulling from the query, posting .75 for the lesson not .25.
I am sure there is a solution for this but I have no Idea.
Outline query.png


Outline report.png
 
In the report, what is the code behind the Lesson Duration calculation? Are you in fact using =SUM([Lesson Duration])?

Side note, don't use spaces in field names, makes coding and querying a little more difficult.
 
I am using =Sum([LessonDuration])
From what I can tell it is totaling from the query, which is probably right. I just don't know how to get what I want.
LessonDuration.png
 
You need to put it where you want it to appear.
 
You need to put it where you want it to appear.
Does not matter where I put it. Here is my DB if you want to check it out. You can use course FIN-AA300 to run the report, it has a parameter set.
 

Attachments

It does matter where you put it. I put it where you said you wanted it and it ran fine for me.
 
see your report and the code on the Load event.
 

Attachments

Users who are viewing this thread

Back
Top Bottom