OpenReport and Subreports

B

Blah

Hello,

I'm have a report and a subreport which is linked by an ID. However, I
can't limit the data return on the subreport at the same time as I limit
the data from the main report using the where clause of OpenReport.

So I got something like this right now:

OpenReport "Main",default view,, "CompID = "& ID &" and report!subreport!
report.Date = #" & inDate & "#"

Thanks in advance
 
A

Allen Browne

Provide a form where the user can enter the limiting dates.

In the query that provides the data for the subreport, enter something like
this under the date field:
Between [Forms].[Form1].[txtStart] And [Forms].[Form1].[txtEnd]
The subreport will then read the dates from the form each time it needs
them. If the main report filters on these dates as well, it guarantees
consistency.
 
M

Mingqing Cheng [MSFT]

Hi Blah,

I am just checking on your progress regarding the information that MVP had
sent to you! Have you tried the steps MVP provided to you? I wonder how the
testing is going. If you encounter any difficulty, please do not hesitate
to let us know. Please post here and let us know the status of your issue.


Sincerely yours,

Mingqing Cheng
Microsoft Developer Community Support
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top