473,327 Members | 1,997 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,327 software developers and data experts.

report/subreport questions

Ron
I have a report let's call rptOne. On rptOne I have a subreport called
srptOne. On srptOne I have a subreport called srptTwo. Sometimes, srptTwo
is there and shows it's data and sometimes not, based on whether there is
data in the query/table that srptTwo is based on of course. All works fine.

However, now I'd like to control whether certain fields are visible on
srptOne based on whether srptTwo is there or not. Is there a way to do
that? And also, if srptTwo is there and based on one of it's controls, is
also visible(there will be times when I'll want it not visible, even though
it's there)...can I change the visibility of the controls that are printing
out for srptOne based on what's on srptTwo, whether it's visible or not?
And if so, how?

TIA
ron
Apr 11 '07 #1
2 2087
On Wed, 11 Apr 2007 02:50:00 GMT, "Ron"
<ro********************@verizon.netwrote:

Sure. Add a column (let's call it ColumnOne) to the query for the
recordsource of srptOne to indicate the count of records in the
related table used by srptTwo.

Then you can write in the Details.OnFormat event:
SomeControl.Visible = (ColumnOne <0)

-Tom.

>I have a report let's call rptOne. On rptOne I have a subreport called
srptOne. On srptOne I have a subreport called srptTwo. Sometimes, srptTwo
is there and shows it's data and sometimes not, based on whether there is
data in the query/table that srptTwo is based on of course. All works fine.

However, now I'd like to control whether certain fields are visible on
srptOne based on whether srptTwo is there or not. Is there a way to do
that? And also, if srptTwo is there and based on one of it's controls, is
also visible(there will be times when I'll want it not visible, even though
it's there)...can I change the visibility of the controls that are printing
out for srptOne based on what's on srptTwo, whether it's visible or not?
And if so, how?

TIA
ron
Apr 11 '07 #2
In srptOne, you have srptTwo in one of the sections (such as Detail.) In
that section, you can test the HasData property of the report in the
subreport control by putting an expression like this into the Control Source
of a text box:
=IIf([srptTwo].[Report].[HasData], "Yep", "Nothing there")

But remember that reports are forward scrolling only. They don't have a
current record. And the subreport could (at least theoretically) have
multiple records where the text box is visible in some rows and not in
others. Attempting to test the Visible property of a control in a subreport
in its parent report is therefore likely to be an exercise in frustration.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Ron" <ro********************@verizon.netwrote in message
news:s1YSh.2484$Z66.9@trnddc06...
>I have a report let's call rptOne. On rptOne I have a subreport called
srptOne. On srptOne I have a subreport called srptTwo. Sometimes, srptTwo
is there and shows it's data and sometimes not, based on whether there is
data in the query/table that srptTwo is based on of course. All works
fine.

However, now I'd like to control whether certain fields are visible on
srptOne based on whether srptTwo is there or not. Is there a way to do
that? And also, if srptTwo is there and based on one of it's controls,
is also visible(there will be times when I'll want it not visible, even
though it's there)...can I change the visibility of the controls that are
printing out for srptOne based on what's on srptTwo, whether it's visible
or not? And if so, how?

TIA
ron
Apr 11 '07 #3

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...
6
by: David B | last post by:
I have a report with 2 sub reports on it. The report is an invoice and the sub reports are dropping data onto the invoice. This worked fine if generating 1 invoice at a time. I am trying to create...
3
by: CSDunn | last post by:
Hello, I have a situation with MS Access 2000 in which I need to display report data in spreadsheet orientation (much like a datasheet view for a form). If you think of the report in terms of what...
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...
1
by: shaqattack1992-newsgroups | last post by:
I know this is kind of a weird question, but is there anyway to give a subreport control of a main report? I posted my situation earlier about having drawings print out after a group. I have a...
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...
3
by: kenneth xg | last post by:
Hi, I have problem on passing parameters to subreports' stored procedures which require parameters, from an asp.net web form. I ve tried to use the stored procedures on the main report it...
2
by: jburris | last post by:
In my current database, I have a single table which contains order information such as product, unit price and payment. The payment for each product is entered in and subtotals and totals are...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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)...
1
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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.