By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,570 Members | 970 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,570 IT Pros & Developers. It's quick & easy.

OpenReport and Subreport problems

P: n/a
Hello,

I'm trying to use the where clause in OpenReport to limit the data return
on the subreport. Is there a way to do it using that method or OpenReport
only work with the report you're opening?

Thanks
Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On Thu, 22 Jul 2004 17:48:15 GMT, Blah <me@nowhere.com> wrote:
Hello,

I'm trying to use the where clause in OpenReport to limit the data return
on the subreport. Is there a way to do it using that method or OpenReport
only work with the report you're opening?

Thanks


How the subreport is linked should take care of that. The Where
condition will work on the main report and the subreport will be
constrained by the linked fields.

- Jim
Nov 13 '05 #2

P: n/a
"Jim Allensworth" <ji****@datacentricsolutions.com> wrote in
news:40****************@news.west.earthlink.net:
On Thu, 22 Jul 2004 17:48:15 GMT, Blah <me@nowhere.com> wrote:
Hello,

I'm trying to use the where clause in OpenReport to limit the data
return on the subreport. Is there a way to do it using that method or
OpenReport only work with the report you're opening?

Thanks


How the subreport is linked should take care of that. The Where
condition will work on the main report and the subreport will be
constrained by the linked fields.

- Jim


Thanks for the quick reply but that's not what exactly I'm looking for.

I forgot to say that the records in the SubReport contain a date. I want
to limit the return by giving it a date range. So like this.
Main Report: all the contact info of a company

Sub Report: all the order they have in the month

I'm not using a form to pass in the parameters but VBA instead.

When I go open the report by double clicking on it, it return the correct
information in the report and all the order record in the sub report.

Thanks
Nov 13 '05 #3

P: n/a
On Thu, 22 Jul 2004 18:15:15 GMT, Blah <me@nowhere.com> wrote:
"Jim Allensworth" <ji****@datacentricsolutions.com> wrote in
news:40****************@news.west.earthlink.net :
On Thu, 22 Jul 2004 17:48:15 GMT, Blah <me@nowhere.com> wrote:
Hello,

I'm trying to use the where clause in OpenReport to limit the data
return on the subreport. Is there a way to do it using that method or
OpenReport only work with the report you're opening?

Thanks


How the subreport is linked should take care of that. The Where
condition will work on the main report and the subreport will be
constrained by the linked fields.

- Jim


Thanks for the quick reply but that's not what exactly I'm looking for.

I forgot to say that the records in the SubReport contain a date. I want
to limit the return by giving it a date range. So like this.
Main Report: all the contact info of a company

Sub Report: all the order they have in the month

I'm not using a form to pass in the parameters but VBA instead.

When I go open the report by double clicking on it, it return the correct
information in the report and all the order record in the sub report.

Thanks


It sounds to me like you don't need a subreport. Just a Record Source
query that contains the company and orders joined. Put the company
info in the header and use the details for ordering info. Then you
open with DoCmd.OpenReport something like...

DoCmd.OpenReport "rptOrders", , , _
"OrderDate Between #1/1/04# And #6/1/04#"

Will that work?

- Jim
Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.