View Single Post
  #6  
Old May 17th, 2010, 04:58 PM posted to microsoft.public.access.reports
jpm[_3_]
external usenet poster
 
Posts: 11
Default Dynamically Add fields/controls to reports

Steve,
My objective is to use one report as a "template" and feed it different
recordsources that have varying numbers of fields with varying field names
which can be displayed for a user to review the information.

This is what I posted earlier:

I would like to add the controls and relate the recordsource fields to them
at run time.(when the report is programmatically loaded)
I'm understanding you to say this isn't possible. . .

If I stick a sub-form/report on a report object, can I set the source
object to an ADO recordset in a non-ADP database file?
If so, will it automatically display the recordset(create fields for display
to the user?)
Are there examples of this that anyone can share?

Much appreciated.

Jim M.

"Steve" wrote in message
...
Please post what your database is about and why you want to do what you
describe here. There are ways to crate a dynamic report you may be able to
use.

Steve



"jpm" uh@Idetestspam@mars wrote in message
...
Hello,

I've not much experience with building reports in MsAccess. Can one
dynamicall add fields/controls to reports from a vba module such as that
linked to a form? i.e. do processing . . .set a sql string as a report's
recordsource, then have the fields of the recordsource added or displayed
in the report. I want to do this without having predefined the report
content/format, etc. Can someone give me information or point me to
information on this?

Part of my reason for persuing this data display method is that there
doesn't seem to be a grid control for displaying data on a form. So, how
about a report that is built dynamically; can I do that?

Thanks for any help,

Jim M.