View Single Post
  #2  
Old May 15th, 2010, 11:29 PM posted to microsoft.public.access.reports
Duane Hookom[_4_]
external usenet poster
 
Posts: 316
Default Dynamically Add fields/controls to reports

Typically reports are well defined for publication. If you need to add
controls and change record sources you can do this with VBA. To add
controls, you would need to be in design view.

I would attempt to find a different solution. You can set the Source Object
of subform control to a query. This is much like a grid control and you
don't need to know the fields returned.

--
Duane Hookom
MS Access MVP


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