Conditional Formatting

donsi

Registered User.
Local time
Today, 05:55
Joined
Sep 1, 2016
Messages
73
I have a report which has employee names, Status (check in/out) and the amount. When report is generated, it shows all day's activity of employee checking in/out items. I manage to format check in & out to two different colors, but I would like to add additional color coding for employees who checked out the item but never checked in. is it possible? and if so what expression would be used. I tried various IIF statements but doesn't produce the results I want.

txtboxes names: TxtEmp, TxtStatus & Txtamount.


Thanks in advance.
 
in the report band (detail or header) to change the color, put in the ON PRINT event:
Code:
select case true
    case txtBox1 = "OUT" and IsNull(txtCheckIn)
          txtbox2.backcolor = vbRed
    case txtBox1 = "OUT" and not IsNull(txtCheckIn)
          txtbox2.backcolor = vbYellow
    case txtBox1 = "IN"
          txtbox2.backcolor = vbWhite
end select
 
in the report band (detail or header) to change the color, put in the ON PRINT event:
Code:
select case true
    case txtBox1 = "OUT" and IsNull(txtCheckIn)
          txtbox2.backcolor = vbRed
    case txtBox1 = "OUT" and not IsNull(txtCheckIn)
          txtbox2.backcolor = vbYellow
    case txtBox1 = "IN"
          txtbox2.backcolor = vbWhite
end select

That worked like a charm. Thank you:)
 

Users who are viewing this thread

Back
Top Bottom