Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using sub-report variables in main report

Status
Not open for further replies.

alley

Programmer
Feb 8, 2000
51
US
Never the twain shall meet, unless you what??<br><br>1. Declare them public in the main report?<br>2. Email them?<br>3. Yell real loud.<br><br>Yelling doesn't work, as you all know.&nbsp;&nbsp;It seems to me there should be a simple way to communicate between a sub-report and the main report, without making the data public, since it is a payroll sub-report.<br><br>Your help, as always, is appreciated.<br>alley<br>
 
Well the basics are<br>Me!FieldName = Me![SubformName].Form![FieldName]<br><br>' set record source to Subform <br>MyRecordSource = &quot;Select * From MyTable Where Somefield = &quot; & Me!OtherField<br>Me![YOURsubform].Form.RecordSource = MyRecordSource<br> <p>DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br> Ask me how Bar-codes can help you.
 
Both reports use queries as data sources.&nbsp;&nbsp;Some of the controls in the sub-report are unbound, calculated fields, which need to be added to some of the main report unbound controls.&nbsp;&nbsp;The print event in several sections of the sub-report is used to activate subs to do the calculations and move results to the main form.<br><br>The calculations are fine but adding to foreign variables doesn't work.&nbsp;&nbsp;Giving a clear problem definition the first time would be more helpful.&nbsp;&nbsp;Sorry about that.<br><br>alley
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top