Ok, that helped! Thank you! But, why can't you imagine this? What is "wrong"
with this?
"Duane Hookom" <duanehookom@NO_SPAMhotmail.com> wrote in message
news:A08B54B4-4F97-4FD4-9625-(E-Mail Removed)...
> I'm not sure what is where in your report but generally you want to change
> properties of controls in code in the On Format event of the section
> containing the control.
>
> I can't imagine attempting to use code like this in either the Report Load
> or Page events.
>
> --
> Duane Hookom
> Microsoft Access MVP
>
>
> "Joseph Greenberg" wrote:
>
>> I am programming in Access 2007 but it has to be compatible with Access
>> 2003. I have a master report that has a field called txtTribe. There are
>> two
>> subreports on this report as well (and two lines, and a memo field). The
>> report is grouped on txtTribe.
>>
>> I have the following code in the Report_Load and Report_Page events:
>>
>> txtFamilyName.ForeColor = RGB(0, 0, 0)
>> txtTribe.ForeColor = RGB(0, 0, 0)
>>
>> If txtTribe = "AAA" Then
>> txtFamilyName.ForeColor = RGB(0, 0, 175)
>> txtTribe.ForeColor = RGB(0, 0, 175)
>> End If
>> If txtTribe = "BBB" Then
>> txtFamilyName.ForeColor = RGB(0, 125, 0)
>> txtTribe.ForeColor = RGB(0, 125, 0)
>> End If
>>
>> The problem I'm having is that the first page does not get the color
>> treatment it is supposed to (AAA is the first group). How can I keep the
>> text black in design mode, and ensure the first page gets the correct
>> coloring? Just as a note, the group CCC is supposed to be black (there
>> are
>> only 3 groups) - that's why I have the code at the top to reset
>> everything
>> to black.
>>
>> Also, how can I iterate through all the fields and controls on the report
>> (including the subreports) and make sure that they all get the same color
>> treatment (the code above changes only 2 fields, I want ALL fields
>> colorized)?
>>
>> Thank you.
>>
>>
>> .
>>
|