473,231 Members | 1,752 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,231 software developers and data experts.

OpenReport and Subreport problems

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
3 2488
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
"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Steve Edwards | last post by:
I am trying to use an existing report as a subreport in another report. I have the subreport added to the main report, but the only thing that shows up where the subreport should be is the name of...
1
by: last Name | last post by:
Hello all, I'm using Access 2000. I have a subreport control which loads a report in the detail section of a main report. I need to keep a count of each item price in the subreport and place it...
7
by: Ellen Manning | last post by:
I've got an A2K report showing students and their costs. Student info is in the main report and costs are in a subreport for each student. The user inputs the program desired then only those...
0
by: Jaap | last post by:
Hi, Situation is as follows: - A report has a subreport - The subreport has records of which two will fit on a page - When the complete report is printed, the last record in the subreport...
3
by: lorirobn | last post by:
Hello, I have a report which uses a subreport. When I run the report, I get "Enter Parameter Value" error message for "tblGuestRoom". I click ok and the report seems to work fine. I...
2
by: Jeff | last post by:
Damn this is frustrating. I have used subreports for years and never had this problem. I have used these things more times than I can remember. Never have I had this problem....
9
by: Alan | last post by:
Hmmm, I'm not too good with the syntax of referencing a subreport. I have frmInvoice which has the invoice details (e.g. ProductCode, ProductCost etc) in the subform frmInvoiceDetails. I'm trying...
11
by: Simon | last post by:
Dear reader, The syntax for the VBA code to change the RowSource of a Master Report is: Me.RowSource = "TableOrQueryName"
2
by: John Sheppard | last post by:
Hello there, I have a report with a subreport on it. The subreport is meant to show multiple child record for each master record. But it only shows the first record. When I open the subreport...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.