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

subreport control visibility

Hi All,

I'm having trouble figuring out the vba(AccessXP) for the following
issue;

I have a report which has a sub-report in the report footer section.
The sub-report has most of it's controls set to visible false. I want
to make some sub-report controls visible if the report name equals a
specific name and other sub-report controls visible if the report name
equals a different report name. The sub-report controls that get
toggled are in the sub-report reportheader section. I can't seem to
get the actual vba code for

I assume the vba code would go in the sub-report header 'on format'
section and would say

if the parent report name is "Blue" then
sub-report reportheader section controlname "Location" visible true
sub-report reportheader section controlname "Direction" visible true
elseif the parent report name is "Red" then
sub-report reportheader section controlname "Sit" visible true
sub-report reportheader section controlname "Section" visible true
end if

thanks
bobh.

Sep 27 '07 #1
2 4873
bobh wrote:
Hi All,

I'm having trouble figuring out the vba(AccessXP) for the following
issue;

I have a report which has a sub-report in the report footer section.
The sub-report has most of it's controls set to visible false. I want
to make some sub-report controls visible if the report name equals a
specific name and other sub-report controls visible if the report name
equals a different report name. The sub-report controls that get
toggled are in the sub-report reportheader section. I can't seem to
get the actual vba code for

I assume the vba code would go in the sub-report header 'on format'
section and would say

if the parent report name is "Blue" then
sub-report reportheader section controlname "Location" visible true
sub-report reportheader section controlname "Direction" visible true
elseif the parent report name is "Red" then
sub-report reportheader section controlname "Sit" visible true
sub-report reportheader section controlname "Section" visible true
end if

thanks
bobh.
Hi Bob:

I went and created a couple of temp Reports. Put the Subreport with two
fields in the footer. Then in the OnOpen event I had the following code.

If Me.Parent.name <"Junk" Then
Me.CountField.Visible = False
Else
Me.SumFieldt.Visible = False
End If

Worked fine. It's funny tho, when I entered Parent. it didn't present
Name in the dropdown list. I forged ahead anyway without problems.
Sep 27 '07 #2
that worked..... thanks :)
bobh.

On Sep 27, 4:43 pm, Salad <o...@vinegar.comwrote:
bobh wrote:
Hi All,
I'm having trouble figuring out the vba(AccessXP) for the following
issue;
I have a report which has a sub-report in the report footer section.
The sub-report has most of it's controls set to visible false. I want
to make some sub-report controls visible if the report name equals a
specific name and other sub-report controls visible if the report name
equals a different report name. The sub-report controls that get
toggled are in the sub-report reportheader section. I can't seem to
get the actual vba code for
I assume the vba code would go in the sub-report header 'on format'
section and would say
if the parent report name is "Blue" then
sub-report reportheader section controlname "Location" visible true
sub-report reportheader section controlname "Direction" visible true
elseif the parent report name is "Red" then
sub-report reportheader section controlname "Sit" visible true
sub-report reportheader section controlname "Section" visible true
end if
thanks
bobh.

Hi Bob:

I went and created a couple of temp Reports. Put the Subreport with two
fields in the footer. Then in the OnOpen event I had the following code.

If Me.Parent.name <"Junk" Then
Me.CountField.Visible = False
Else
Me.SumFieldt.Visible = False
End If

Worked fine. It's funny tho, when I entered Parent. it didn't present
Name in the dropdown list. I forged ahead anyway without problems.- Hide quoted text -

- Show quoted text -

Sep 28 '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...
9
by: Downstreamer | last post by:
Design is as follows: A form for the user to input criteria to be used as the where part of the report's recordsource. This includes a multiselect list box as part of the criteria selection. ...
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...
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...
4
by: MLH | last post by:
I have a report and on it, a subreport control Main Report Name: rptInvoiceMain Sub Report Name: rptInvoiceSubReport SubReport Control Name: rptInvoiceSubReportCtl The...
2
by: Ron | last post by:
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,...
17
by: =?Utf-8?B?SGVyYg==?= | last post by:
I have created a report and subreport in VB/ASP.NET. The report works fine but the subreport will not display. The subreport, when displayed as a standalone report, works fine. Any help I can...
3
by: Simon | last post by:
Dear reader, The syntax for the VBA code to change the RecordSource of a Master Report is: Me.RecordSource = "TableOrQueryName"
3
by: Simon van Beek | last post by:
Dear reader, How to change the RecordSource for a subReport. For forms the syntaxes is:
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.