Rectangulos con colores en informes
Publicado por Ricardo Ramirez (1 intervención) el 09/03/2010 18:32:44
Hola que tal! Mi duda es que ya tengo mi base de datos completa, pero tengo que mandar a imprimir un informe el cual tenga un rectangulo que se ilumine dependiendo de 2 campos los cuales se comparan, un ejemplo de la macro que uso en el formulario:
Private Sub rectangulo_color()
If CAMPO1 > CAMPO2 Then
nivel.BackStyle = 1
nivel.BackColor = RGB(255, 0, 0)
End If
If CAMPO1 < CAMPO2 Then
nivel.BackStyle = 1
nivel.BackColor = RGB(0, 255, 0)
End If
If CAMPO1 = CAMPO2 Then
nivel.BackStyle = 1
nivel.BackColor = RGB(255, 255, 0)
End If
End Sub
Private Sub Form_Current()
rectangulo_color
End Sub
Pero en el informe no pasa nada, es posible esto?
Gracias de antemano
Ricardo
Private Sub rectangulo_color()
If CAMPO1 > CAMPO2 Then
nivel.BackStyle = 1
nivel.BackColor = RGB(255, 0, 0)
End If
If CAMPO1 < CAMPO2 Then
nivel.BackStyle = 1
nivel.BackColor = RGB(0, 255, 0)
End If
If CAMPO1 = CAMPO2 Then
nivel.BackStyle = 1
nivel.BackColor = RGB(255, 255, 0)
End If
End Sub
Private Sub Form_Current()
rectangulo_color
End Sub
Pero en el informe no pasa nada, es posible esto?
Gracias de antemano
Ricardo
Valora esta pregunta


0