Sub Reports

  • Thread starter Thread starter emmanuel mathew via AccessMonster.com
  • Start date Start date
E

emmanuel mathew via AccessMonster.com

Hi,

I have a main report and a sub report. Main report has 3 parameters and
the main report works fine. Now I want to add a sub report to it. The sub
report should have the same three parameters as the Main report has.

The important factor is HOW I CAN DO THIS THROUGH CODE? I know, how to do
this through the GUI. [Linking the Main and Sub Report]

Let me tell you the problem in more detail. When ever I link the reports,
they work, but the parameters which are sent from main report to the sub
report is undependable. It varies from time to time with no basis. So I am
in search of a more reliable method, and I hope, this can be acomplished
through code. I am using Dot net and for Coding , I use C#.

Please give me your feedbacks and helps. I searched a lot but the result
was hopeless.

So Awaiting your repsponses.

Thanks in Advance.

Emmanuel Mathew
 
On the load event of the main report enter the code

me.[subreportname].recordsource="Select * From MyTable Where FieldStr = '" &
Param1 & "' And FieldNum = " & Param2 & " FieldDate = #" & Param3 & "#"

I hope that what you looking for
 
Back
Top