A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Setting report child's SourceObject in VB



 
 
Thread Tools Display Modes
  #1  
Old November 3rd, 2005, 04:31 PM
Aaron G
external usenet poster
 
Posts: n/a
Default Setting report child's SourceObject in VB

Using Access 2003...

I have a master report (rptMaster) that has the header and footer I want for
every report. This master report also has an unbound child window. I create
sub reports that I use to actually populate the reports. I want to
dynamically change what sub report is the source object for that master
report depending on which command buttin I click. I'm hitting my head on the
wall for the VB code for this. Any ideas?

TIA

Aaron G
Philadelphia, PA
  #2  
Old November 3rd, 2005, 09:18 PM
Marshall Barton
external usenet poster
 
Posts: n/a
Default Setting report child's SourceObject in VB

Aaron G wrote:

Using Access 2003...

I have a master report (rptMaster) that has the header and footer I want for
every report. This master report also has an unbound child window. I create
sub reports that I use to actually populate the reports. I want to
dynamically change what sub report is the source object for that master
report depending on which command buttin I click. I'm hitting my head on the
wall for the VB code for this. Any ideas?



First, the code must be in the main report's Open event
procedure.

You can probably pass the source object setting from the
form to the main report using the OpenReport method's
OpenArgs argument.

The code in the Open event could be something like:

Me.subreportcontrol.SourceObject = Me.OpenArgs

--
Marsh
MVP [MS Access]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
To Sharkbyte and all: Calculate a total values in group level Ally General Discussion 6 June 13th, 2005 08:16 PM
Still Hoping for help with a Query problem Don Sealer Using Forms 15 November 13th, 2004 06:24 AM
Display Parameter from Form on Report sara Setting Up & Running Reports 10 July 19th, 2004 04:54 PM
Trouble setting unbound field on report. I'm a Trampoline General Discussion 4 June 23rd, 2004 06:36 AM
Label SRIT General Discussion 2 June 22nd, 2004 09:42 PM


All times are GMT +1. The time now is 11:50 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.