color of thine of the section detail (1 Viewer)

habiler

Registered User.
Local time
Today, 18:19
Joined
Aug 10, 2014
Messages
70
Good evening to all,

In the section detail I would wish that all the line appaers and is printed in blue(by ex) if the value of [klasse] = 1.

I have already tried the CF but I crashed

Excellent evening and well week end

Habiler
 

llkhoutx

Registered User.
Local time
Today, 11:19
Joined
Feb 26, 2001
Messages
4,018
Use the Detail section onfomat event to set the colors you want, alternatively use the conditional format icon on the ribbon..
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 00:19
Joined
May 7, 2009
Messages
19,246
on you reports event:

Private lngLineColor As Long

Private Sub Form_Open(Cancel As Integer)

lngLineColor = Me!yourLineControlName.ForeColor

End Sub

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me![klasse] = 1 Then
Me!yourLineControlName.ForeColor = vbBlue
Else
Me!yourLineControlName.ForeColor = lngLineColor
End If
End Sub
 

Users who are viewing this thread

Top Bottom