B
BobRoyAce
I have a chart on a report with a Row Source that includes two values to be pulled from a form as well as one that needs to be returned by calling a function (GetLargestCategory). Assume that the function involved returns a single-quote delimeted string (e.g. 'Category1'). A sample Row Source is shown below. My question is "What is the proper way to include a function call in the Row Source property?" I have done it as shown below and I get no data back in spite of the fact that, if I manually construct the SQL referencing the form controls, and the function call, I get data back
--- ROW SOURCE BEGINS --
PARAMETERS [Forms]![Reporting]![Month] IEEEDouble, [Forms]![Reporting]![Line] Text ( 255 )
TRANSFORM Sum(TimeTaken) AS SumOfTim
SELECT FiscalMont
FROM Table
WHERE (SystemMonth=[Forms]![Reporting]![Month]
AND (Line=[Forms]![Reporting]![Line]
AND (Category=GetLargestCategory()
GROUP BY FiscalMont
PIVOT CategorySubTyp
--- ROW SOURCE ENDS --
--- ROW SOURCE BEGINS --
PARAMETERS [Forms]![Reporting]![Month] IEEEDouble, [Forms]![Reporting]![Line] Text ( 255 )
TRANSFORM Sum(TimeTaken) AS SumOfTim
SELECT FiscalMont
FROM Table
WHERE (SystemMonth=[Forms]![Reporting]![Month]
AND (Line=[Forms]![Reporting]![Line]
AND (Category=GetLargestCategory()
GROUP BY FiscalMont
PIVOT CategorySubTyp
--- ROW SOURCE ENDS --