J
Joseph Greenberg
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.
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.