473,394 Members | 1,709 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.

Transparent Background on Subform

Hello,

I have a report with 2 subreports in the detail section. I have just
changed the report so that if a "Ready" checkbox is checked yes, the
background color of the detail section of the main report changes to
green. I used the following code in the main report format of the
detail section:

If [Ready] = True Then
Section(0).BackColor = vbGreen
Else
Section(0).BackColor = vbWhite
End If

End Sub

This works great, but the background color of my subreports is still
white while the rest of the detail section is green. Is there a way to
make the background color of the subreports transparent so the green
shows through? If not, is there a way to set the background color on
the subreports to the same color as the main report based on the
checkbox condition? Any help would be appreciated.

Thank You,

Chad

Nov 13 '05 #1
3 11319
sh***********************@yahoo.com wrote:
Hello,

I have a report with 2 subreports in the detail section. I have just
changed the report so that if a "Ready" checkbox is checked yes, the
background color of the detail section of the main report changes to
green. I used the following code in the main report format of the
detail section:

If [Ready] = True Then
Section(0).BackColor = vbGreen
Else
Section(0).BackColor = vbWhite
End If

End Sub

This works great, but the background color of my subreports is still
white while the rest of the detail section is green. Is there a way to
make the background color of the subreports transparent so the green
shows through? If not, is there a way to set the background color on
the subreports to the same color as the main report based on the
checkbox condition? Any help would be appreciated.

Thank You,

Chad

I'm just guessing but you probably have to set the background color of
your subreport to a color also. Change SubReportName to your sub report
name and see if that works.

If [Ready] Then
Section(0).BackColor = vbGreen
me.SubReportName.Report.Section(0).BackColor = vbGreen
Else
Section(0).BackColor = vbWhite
me.SubReportName.Report.Section(0).BackColor = vbWHite
End If
Nov 13 '05 #2
Go into Design view on both reports
Right click on the background of the parent report and copy the 'Back
Color' property
Right click on the background of the child report and paste into the
'Back Color' property
Or a variaton on what salad was telling you
In the subreport . . .
Private Sub Form_Load()
On error resume next
Me.Detail.BackColor=Me.Parent.Detail.BackColor
End Sub
HTH
Pachydermitis

Nov 13 '05 #3
That worked perfectly. Thanks for the help.

Chad

Nov 13 '05 #4

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

Similar topics

8
by: Grahammer | last post by:
Is it possible to set the background of a usercontrol as transparent? I tried setting the background image of the usercontrol to a transparent GIF, but that caused MAJOR problems. I'm making...
5
by: Juan Romero | last post by:
Hey guys, Does anyoone know how to make a control with transparent background? This is what I have so far and it doesn't work: Me.SetStyle(ControlStyles.SupportsTransparentBackColor, True)...
4
by: Vincent | last post by:
Hi all, I would like to make a table or a div with a transparent background. The solution found does work only with FireFox using a png image. The second one works with IE and FireFox but make...
0
by: MLH | last post by:
My question is not how to paste images in Access with transparent backgrounds. I've researched 4-6 year old postings adequately describing how to achieve this. Lebans' site does a good job of...
0
by: rh | last post by:
Hi, I am using a ASP.NET 2.0 Menu control and would like the dynamic menu to have a transparent background so that whatever is behind it is partly visible between each dynamic menu item. I've...
2
by: Trond Michelsen | last post by:
Hi. I have a transparent PNG-image that I would like to display on top of the rest of the web page. I've already got this part working. But, I'd like the background (as in "the part of the image...
0
by: Martijn Mulder | last post by:
How can I give my custom System.Windows.Forms.Control a transparent background? In the small application below I expect to see two partially overlapping circles, a blue one and a red one, but only...
11
by: vbt | last post by:
I am having difficult time drawing a image using Visual Studio Image Editor. I can draw the image and save it as .bmp file load it into a pictureBox image but when the program is run the...
2
by: Niu Kun | last post by:
Dear all, I'm trying to draw many overlapped PNG files with transparent background in imagebox control. But the transparent background in this control is rendered as the main control's...
8
by: salmobytes | last post by:
Making thumbnail images isn't all that hard, for the most part. There is lots of shrink-wrapped code out there you can download and/or munge from. But nothing I've yet seen does the right thing...
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
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...
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
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.