YTD Total in Report

jonman03

Registered User.
Local time
Today, 09:47
Joined
Nov 5, 2009
Messages
31
Hey everyone,

I have a report that shows sales by month. I have it set up so the user selects which month they want on a form, and then that filters the report. Values in the month field are: Jan, Feb, Mar, Apr, May, etc.

Is there any way to include a YTD (Year to date) column in my report as well?

For example, if a user selects they want to see the report for March, the report will show the March sales figures in one column and then have another column that shows the total YTD (Jan + Feb + Mar sales)

Thanks everyone!
 
Sure.

To calculate the Start of the year use:

DateSerial(Year(Date()), 1, 1)

You can use this to crete the date range for the sum of the YTD as needed.

It is hard to give you much specifics without more deatisl on how you get the month range now.
 
Right now I just have the user select which month they wish to view from a form. Values like "Jan";"Feb";"Mar";... etc are in the combo box.

That drives to the report query and filters based on their month selection.

How can I use the DateSerial to total the months up to the one the user selected? or is there another way?
 
Right now I just have the user select which month they wish to view from a form. Values like "Jan";"Feb";"Mar";... etc are in the combo box.

That drives to the report query and filters based on their month selection.

How can I use the DateSerial to total the months up to the one the user selected? or is there another way?

If you select just he month, then how do you know which year?

How do you get the date range now?
 

Users who are viewing this thread

Back
Top Bottom