I have the following code in my report, and it works great (thanks to help from this forum).
Private Sub GroupFooter0_Format(Cancel As Integer, FormatCount As Integer)
If Me![StatusCode] = 0 Then
Me.Box53.BackColor = RGB(0, 0, 0)
ElseIf Me.StatusCode = 1 Then
Me.Box53.BackColor = RGB(210, 170, 100)
ElseIf Me.StatusCode = 2 Then
Me.Box53.BackColor = RGB(200, 175, 80)
ElseIf Me.StatusCode = 3 Then
Me.Box53.BackColor = RGB(180, 180, 60)
ElseIf Me.StatusCode = 4 Then
Me.Box53.BackColor = RGB(160, 190, 50)
ElseIf Me.StatusCode = 5 Then
Me.Box53.BackColor = RGB(120, 200, 30)
ElseIf Me.StatusCode = 6 Then
Me.Box53.BackColor = RGB(80, 225, 20)
ElseIf Me.StatusCode = 7 Then
Me.Box53.BackColor = RGB(0, 255, 0)
Else
Me.Box53.BackColor = 0
End If
End Sub
However, I need to e-mail this report to somebody in exactly this format.
If I publish it with Word as .rtf, it loses all of the coloured boxes etc.
Can someone help, please?
Cheers in anticipation
Giz
Private Sub GroupFooter0_Format(Cancel As Integer, FormatCount As Integer)
If Me![StatusCode] = 0 Then
Me.Box53.BackColor = RGB(0, 0, 0)
ElseIf Me.StatusCode = 1 Then
Me.Box53.BackColor = RGB(210, 170, 100)
ElseIf Me.StatusCode = 2 Then
Me.Box53.BackColor = RGB(200, 175, 80)
ElseIf Me.StatusCode = 3 Then
Me.Box53.BackColor = RGB(180, 180, 60)
ElseIf Me.StatusCode = 4 Then
Me.Box53.BackColor = RGB(160, 190, 50)
ElseIf Me.StatusCode = 5 Then
Me.Box53.BackColor = RGB(120, 200, 30)
ElseIf Me.StatusCode = 6 Then
Me.Box53.BackColor = RGB(80, 225, 20)
ElseIf Me.StatusCode = 7 Then
Me.Box53.BackColor = RGB(0, 255, 0)
Else
Me.Box53.BackColor = 0
End If
End Sub
However, I need to e-mail this report to somebody in exactly this format.
If I publish it with Word as .rtf, it loses all of the coloured boxes etc.
Can someone help, please?
Cheers in anticipation
Giz