CSADataCruncher
Technical User
Dear experts,
I've searched for some conditional formatting of different items on an Access Report. Scenario#1 works perfectly (thanks to Duane's help). However, what I'm trying to accomplish now is to have the Company field/Groupheader have a gray background (I know, my test scenario is for red), if the value of the RecAdd field is 999.
As mentioned, the coding for #1 works but #2 doesn't.
Scenario#1
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Title.FontBold = IIf([RecAdd] = 999, True, False)
End Sub
Scenario#2
Private Sub GroupHeader3_Format(Cancel As Integer, FormatCount As Integer)
If [RecAdd] = 999 Then
[Company] BackColor = 255
Else
[Company] BackColor = 16777215
End If
End Sub
I've also tried including company.backcolor rather than "[Company] BackColor" and I have tried
Title.BackColor = IIf([RecAdd] = 999, 255, 16777215)
Would someone be able to help me accomplish the goal of making the Company field/groupheader have a gray background if the value of the RecAdd field is 999?
Thank you, in advance, for any help in this area.
Peggy
I've searched for some conditional formatting of different items on an Access Report. Scenario#1 works perfectly (thanks to Duane's help). However, what I'm trying to accomplish now is to have the Company field/Groupheader have a gray background (I know, my test scenario is for red), if the value of the RecAdd field is 999.
As mentioned, the coding for #1 works but #2 doesn't.
Scenario#1
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Title.FontBold = IIf([RecAdd] = 999, True, False)
End Sub
Scenario#2
Private Sub GroupHeader3_Format(Cancel As Integer, FormatCount As Integer)
If [RecAdd] = 999 Then
[Company] BackColor = 255
Else
[Company] BackColor = 16777215
End If
End Sub
I've also tried including company.backcolor rather than "[Company] BackColor" and I have tried
Title.BackColor = IIf([RecAdd] = 999, 255, 16777215)
Would someone be able to help me accomplish the goal of making the Company field/groupheader have a gray background if the value of the RecAdd field is 999?
Thank you, in advance, for any help in this area.
Peggy