I'm not sure either. I am trying to display the month AND year in a format
like: "Jan '10" in the x axis of the chart coinciding with a plot mark
depending on an item in a listbox next to it. For example, the list box has a
number displayed ased on a query I have ran. When I select the item in the
list box, that number shows up on the graph.
I am assuming that 24120 that it is calculating is somehow getting the year
to show up in the x axis but for now I can only get the month to work.
Here is the SQL for the graph:
SELECT MonthDisplay([OBMonth]) AS Expr1, Sum(qryLOSATrend_HF.HumanFactorQTY)
AS SumOfHumanFactorQTY
FROM qryLOSATrend_HF
GROUP BY MonthDisplay([OBMonth]), (Year([OBMonth])*12+Month([OBMonth])-1)
ORDER BY (Year([OBMonth])*12+Month([OBMonth])-1);
ghetto_banjo said:
i guess ObMonth is a date/time field?
the year function returns the Year of a date, and the Month function
returns the month.
i.e. Year(#01/21/2010#) = 2010
and Month(#01/21/2010#) = 1
so that function is taking the year value of ObMonth, multiplying by
12, then Adding the month value of ObMonth, and subtracting 1 from
that.
so say ObMonth = #01/21/2010#
then Year([ObMonth])*12 + Month ([OBMonth]) - 1
=
2010 * 12 + 1 - 1 = 24120
Not sure what that value is supposed to describe in your row source.