473,320 Members | 1,977 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,320 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 2492
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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.