Access 2003
VB 6.5
I'm attempted to run conditional formatting on a date field based on the value in another field. I've steped through this code and it is recognizing the values correct and is even executing the code to set the back ground color. However when run the report I don't get any formatting.
Any help would be appreciated!
Private Sub Detail_Format(C ancel As Integer, FormatCount As Integer)
On Error GoTo Detail_Format_E rror
Select Case [Reports]![pm_original_sco recard_report]![def_doc_health_ cd].Value
Case Is = "YL"
[Reports]![pm_original_sco recard_report]![def_doc_act_cmp lt_dt].BackColor = vbYellow
Case Is = "GN"
[Reports]![pm_original_sco recard_report]![def_doc_act_cmp lt_dt].BackColor = vbGreen
Case Is = "BL"
[Reports]![pm_original_sco recard_report]![def_doc_act_cmp lt_dt].BackColor = vbBlue
Case Is = "RD"
[Reports]![pm_original_sco recard_report]![def_doc_act_cmp lt_dt].BackColor = vbRed
Case Else
[Reports]![pm_original_sco recard_report]![def_doc_act_cmp lt_dt].BackColor = vbWhite
End Select
Detail_Format_E xit:
Exit Sub
Detail_Format_E rror:
MsgBox "Error " & Err.Number & ": " & Err.Description
Resume Detail_Format_E xit
End Sub
VB 6.5
I'm attempted to run conditional formatting on a date field based on the value in another field. I've steped through this code and it is recognizing the values correct and is even executing the code to set the back ground color. However when run the report I don't get any formatting.
Any help would be appreciated!
Private Sub Detail_Format(C ancel As Integer, FormatCount As Integer)
On Error GoTo Detail_Format_E rror
Select Case [Reports]![pm_original_sco recard_report]![def_doc_health_ cd].Value
Case Is = "YL"
[Reports]![pm_original_sco recard_report]![def_doc_act_cmp lt_dt].BackColor = vbYellow
Case Is = "GN"
[Reports]![pm_original_sco recard_report]![def_doc_act_cmp lt_dt].BackColor = vbGreen
Case Is = "BL"
[Reports]![pm_original_sco recard_report]![def_doc_act_cmp lt_dt].BackColor = vbBlue
Case Is = "RD"
[Reports]![pm_original_sco recard_report]![def_doc_act_cmp lt_dt].BackColor = vbRed
Case Else
[Reports]![pm_original_sco recard_report]![def_doc_act_cmp lt_dt].BackColor = vbWhite
End Select
Detail_Format_E xit:
Exit Sub
Detail_Format_E rror:
MsgBox "Error " & Err.Number & ": " & Err.Description
Resume Detail_Format_E xit
End Sub
Comment