Good Morning all:
Is it possible to create a report that can have multiple (not at the same time) data sources? I would like to have the report select the data source from a dynamic list box of inputs. Any and all suggestions would be appreciated and most helpful. TIA.
Bill K.
Dynamic Reports
-
- Administrator
- Posts: 78594
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Dynamic Reports
As long as the data sources have the same field names, that should be possible: you can set the Record Source of a report in its On Open event, like this:
where frmSelect is a form and lbxDataSources a list box on that form listing the names of the data sources.
Code: Select all
Private Sub Report_Open(Cancel As Integer)
Me.RecordSource = Forms!frmSelect!lbxDataSources
End Sub
Best wishes,
Hans
Hans
-
- 3StarLounger
- Posts: 287
- Joined: 09 Mar 2010, 23:16
- Location: Canberra Australia
Re: Dynamic Reports
Or as in the example of Dynamic Cross tab reports the Control Source of individual controls on the report is set when the report is opened.As long as the data sources have the same field names
Regards
John
John
-
- StarLounger
- Posts: 71
- Joined: 27 Aug 2010, 09:13
Re: Dynamic Reports
Hey John,
Thanks for the reply. I think I found what I need on Roger Carlson's web site. He's got a few excellent examples.
Bill K.
Thanks for the reply. I think I found what I need on Roger Carlson's web site. He's got a few excellent examples.
Bill K.
-
- Administrator
- Posts: 78594
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
-
- PlutoniumLounger
- Posts: 15645
- Joined: 24 Jan 2010, 23:23
- Location: brings.slot.perky
Re: Dynamic Reports
Oh great. Just Great.HansV wrote:... you can set the Record Source of a report in its On Open event, ...
Now you guys have started to anticipate my Access questions ..... and
He who plants a seed, plants life.
-
- 4StarLounger
- Posts: 482
- Joined: 24 Jan 2010, 15:02
- Location: Colorado, USA
Re: Dynamic Reports
That's because we've already asked the same question and our head against the wall, or asked somebody till we figured out the answer - most of the time hopefully.
Wendell
You can't see the view if you don't climb the mountain!
You can't see the view if you don't climb the mountain!