Question Calculated ??

Dummy1912

Member
Joined
May 14, 2010
Messages
6
Programming Experience
1-3
Hello Guys,

i have a problem with my program
i want to work with 2 color's
red and green

i want get the red color if the calculated -
and green if it is +

this is what i use:

PHP:
    Dim fmtString0 As String = " " & "###,###,###,##0.00" & " €"

Dim Amount as Double

If RsHouse.Fields!groep.Value = "ontvangst" Then
                    Amount += cDAL.VarToDbl(RsHouse.Fields!bedrag.Value())
                    lstView.Items(i).ForeColor = System.Drawing.Color.Green()
                    Me.Label10.Text = Format(Amount, fmtString0)
                ElseIf RsHouse.Fields!groep.Value = "uitgave" Then
                    Amount -= cDAL.VarToDbl(RsHouse.Fields!bedrag.Value())
                    lstView.Items(i).ForeColor = System.Drawing.Color.Red()
                    Me.Label10.Text = Format(Amount, fmtString0)
                ElseIf RsHouse.Fields!groep.Value = "overboekingen" Then
                    lstView.Items(i).ForeColor = System.Drawing.Color.DarkGray()
                    Me.Label10.Text = Format(Amount, fmtString0)
                Else
                   
                End If

                
                If Amount > Val(RsHouse.Fields!bedrag.Value) Then
                   
                    Label10.ForeColor = Color.Red
                Else
                   
                    Label10.ForeColor = Color.Green
                End If

Sorry for the dutch parts :)

but it stays green if i get '-40,00' this must be red

any body can help me please
please look at the attach file.

thanks

Dummy1912
 

Attachments

  • Naamloos 9.png
    Naamloos 9.png
    10.8 KB · Views: 35
Back
Top