Double click on the gray bar at the top of the appropriate
section.
Select the events tab in the property sheet.
Look down the list of event **properties** for the OnFormat
property.
Select [Event Procedure] from the drop list on the right
side of the property.
Click on the builder button [...] to the right of the drop
down button.
You should then be in the Format event **procedure** where
you can put the code.
Note that the code I posted made several assumptions that
may or may not be valid. E.g. that the color you want was
already set on the main report. If that was a poor
assumption and all you have is a value in the subreport
(similar to what you have in the form), then you can use
code like you have in the form.
If you want to change the color of a text box instead of the
section, then the code might be the same as the code in the
form.
Where do I find the Format event in Access 2003? Just guide me thru simple
steps to get all of this accomplished.
:
The subreport can get the information from main report by
using the Parent property.
For example, you could set the subreport detail section's
color by using this in the detail section's Format event
procedure:
Me.Section(0).BackColor = Parent.PreviousStatus.BackColor
Ben wrote:
I have a form that changes the color of the combo box to a color based on the
user's choice.
if [PreviousStatus] = "Blue" Then
[PreviousStatus].BackColor = 16711680
I have this information in a table. Separately, on a subreport I want the
subreport to show the right color for whatever the value is from that table
from [PreviousStatus] to be on the subreport too.