Including a function in a chart's row source

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

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