Colour Problem

GizmoT

Registered User.
Local time
Today, 05:08
Joined
May 28, 2003
Messages
86
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
 
GizmoT said:
I have the following code in my report, and it works great (thanks to help from this forum).

But it's horribly untidy.

Code:
Private Sub GroupFooter0_Format(Cancel As Integer, FormatCount As Integer)

With Me.Box53
    Select Case Me.StatusCode
        Case Is = 0
            .BackColor = RGB(0, 0, 0)
        Case Is = 1
            .BackColor = RGB(210, 170, 100)
        Case Is = 2
            .BackColor = RGB(200, 175, 80)
        Case Is = 3
            .BackColor = RGB(180, 180, 60)
        Case Is = 4
            .BackColor = RGB(160, 190, 50)
        Case Is = 5
            .BackColor = RGB(120, 200, 30)
        Case Is = 6
            .BackColor = RGB(80, 225, 20)
        Case Is = 7
            .BackColor = RGB(0, 255, 0)
        Case Else
            .BackColor = RGB(0, 0, 0)
    End Select
End With

End Sub
 
Why thank you kind sir - your comments noted and acted upon.

Now how do I send it?
 
Now, I'm not a user of Access's reports so I have no idea. If you have A2000 or above, don't you have the opportunity to send a snapshot in an email using the SendObject method?
 
Mile - you little BEAUTY!!!


It isn't true what they say about you. You are spot on!!




Thanks for your help



Giz
 
Errrrrr.... One slight problem!!!

The person I tested the e-mail to has A2002, and it was spot on.

Problem is the person I want to send it to, doesn't. They can't open a .snp file.

Back to the drawing board.



Any more ideas?
:(
 

Users who are viewing this thread

Back
Top Bottom