NickName wrote:
Well, I guess we miscommunicated. I'm trying to figure out a way to
get the sql statement for report footer if any for a given rept. The
reason is, we're moving away from Access and I need to migrate all the
reports to a new platform, going to report design view to capture it
one by one would be most undesirable. Thanks though.
Report footers don't have a SQL statement of their own. You could try to
determine the SQL being generated from a textbox with a sum() in it, if
the report's recordsource is a table or query it would be:
"Select " & Mid(Textbox,2) & " from " & rpt.Recordsource
However, it gets more complicated when you apply filters to the report
or if the report is based on a SQL statement.