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

Changing the visible setting for a field in a sub report

I have a command button that opens the a report. On the report the
bulk of the information is in the sub report. I have a check box on
the form that if isn't check will cause a field to be invisible on the
report. I want to be able to set the corresponding field on the sub
report the same way. I can't seem to get the syntax right to change
the visible value in the sub report. Right now I'm using "Reports!
rpt_top_user!rpt_top_user_sub!ts_opname.Visible = False" and the I get
an error saying that if can't find the field "rpt_top_user_sub". Any
ideas??

Mar 19 '07 #1
4 2057

I think the normal breakdown is:
Main Report Sub Report Control Name.Report >Sub Report Control Name

Reports!rpt_top_user!rpt_top_user_sub.Report!ts_op name.Visible = False
where rpt_top_user_sub is the name of the subreport control, not the
name of the report in it.

Where are you using this statement by the way?

Mar 19 '07 #2
I believe you can use the "Parent" property in a sub report. In the onFormat
event of the subreport use Me.Parent to check the value of your check box
and set the control's visibility.

"Bill" <wl*********@gmail.comwrote in message
news:11**********************@l75g2000hse.googlegr oups.com...
I have a command button that opens the a report. On the report the
bulk of the information is in the sub report. I have a check box on
the form that if isn't check will cause a field to be invisible on the
report. I want to be able to set the corresponding field on the sub
report the same way. I can't seem to get the syntax right to change
the visible value in the sub report. Right now I'm using "Reports!
rpt_top_user!rpt_top_user_sub!ts_opname.Visible = False" and the I get
an error saying that if can't find the field "rpt_top_user_sub". Any
ideas??

Mar 20 '07 #3
On Mar 19, 6:07 pm, "storrboy" <storr...@sympatico.cawrote:
I think the normal breakdown is:
Main Report Sub Report Control Name.Report >Sub Report Control Name

Reports!rpt_top_user!rpt_top_user_sub.Report!ts_op name.Visible = False
where rpt_top_user_sub is the name of the subreport control, not the
name of the report in it.

Where are you using this statement by the way?
I'm using this statement for the "on click" of the command button. It
comes right after the statement is issued to open the report

Mar 20 '07 #4
Using "Reports!rpt_top_user!rpt_top_user_sub.Report!ts_o pname.Visible
= False" did the trick.

Thanks for the help.

Mar 20 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: horos | last post by:
hey all, Ok, a related question to my previous one on data dumpers for postscript. In the process of putting a form together, I'm using a lot of placeholder variables that I really don't care...
0
by: bill mahoney | last post by:
I have access 2k and I have 2 tables. One is a 7X6 table representing a month with zeroes padding the fields where no day exist. For example February 2003 0 0 0 0 0 0 1 2 3 4 5 6 7 ...
2
by: ColinWard | last post by:
Hi. I have a form which has as its recordsource an SQL string. The SQL String is as follows: SELECT * from CONTACTS where false. this ensures that there is no data loaded in the form when the...
7
by: Simon Verona | last post by:
I posted this in dotnet.languages.vb.controls but thought I'd post here as well.. I have a combobox that is bound to a dataview generated from a dataset. The dataset has a single table...
2
by: SEFL | last post by:
Hi there, I've got a code sample below from a report from a computer database that I have built with a printer subtable, which in turn generates a printer subreport that I'm trying to put on its...
1
by: pdm | last post by:
hoi access, I have a subreport and with the id of inheritance of OOP I like to reuse this subreport in other main reports and hide some fields. First, is this possible and second what is the...
3
by: =?Utf-8?B?RnJlZHJpaw==?= | last post by:
Hi I have a problem in one of my user controls that I cannot find any solution for. I'am running C# for Visual studio 2003 and developing a windows application. The problem is the following: I...
12
by: Studiotyphoon | last post by:
Hi, I have report which I need to print 3 times, but would like to have the following headings Customer Copy - Print 1 Accounts Copy - Print 2 File Copy -Print 3 I created a macro to...
4
by: thecheyenne | last post by:
Hi there everybody; Fresh from reading my Access VBA for Dummies, I'd like to update my database about activities on a school outing. Here's what I'd like to achieve. The school outing costs...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.