E
EddiesVoicebox via AccessMonster.com
Hi All,
I am trying desperately to create a report that will highlight missing data.
currently i have the report built but just want to change the colour of the
fields when they are empty.
After much trawling the net i found the code below. I just cant get it to
work. I only want the empty cells changed and it is changing the entire
column to white (not red). Any advice woudl be most welcome.
Regards
EddiesVoicebox
Private Sub detail_format(cancel As Integer, formatcount As Integer)
Dim bgred As Long, bgwhite As Long
bgred = RGB(255, 0, 0)
bgwhite = RGB(255, 255, 255)
If Me.Payroll_Number.Value = Null Then
Me.Payroll_Number.BackColor = bgred
Else
Me.Payroll_Number.BackColor = bgwhite
End If
If Me.Line_Manager.Value = Null Then
Me.Line_Manager.BackColor = bgred
Else
Me.Line_Manager.BackColor = bgwhite
End If
End Sub
I am trying desperately to create a report that will highlight missing data.
currently i have the report built but just want to change the colour of the
fields when they are empty.
After much trawling the net i found the code below. I just cant get it to
work. I only want the empty cells changed and it is changing the entire
column to white (not red). Any advice woudl be most welcome.
Regards
EddiesVoicebox
Private Sub detail_format(cancel As Integer, formatcount As Integer)
Dim bgred As Long, bgwhite As Long
bgred = RGB(255, 0, 0)
bgwhite = RGB(255, 255, 255)
If Me.Payroll_Number.Value = Null Then
Me.Payroll_Number.BackColor = bgred
Else
Me.Payroll_Number.BackColor = bgwhite
End If
If Me.Line_Manager.Value = Null Then
Me.Line_Manager.BackColor = bgred
Else
Me.Line_Manager.BackColor = bgwhite
End If
End Sub