Lgvalencia
New member
- Local time
- Today, 07:53
- Joined
- Mar 8, 2023
- Messages
- 10
I have a form and when the CDRL Type is Approval then I want it to show items in RED. When the CDRL Type is Non-Approval etc. then it would be black. It stopped working and I am not sure why. If anyone can point out why it doesn't turn RED it would be helpful.
Code:
Private Sub Detail1_Format(Cancel As Integer, FormatCount As Integer)
If Me![Expr3] = 1 Then
' Me![Part Number Label].Visible = True
Me![Item Number Label].Visible = True
Me![Comments Label].Visible = True
Else
' Me![Part Number Label].Visible = False
Me![Item Number Label].Visible = False
Me![Comments Label].Visible = False
End If
If Me![CDRL Type] = "Non-Approval" Or Me![CDRL Type] = "For Review" Or Me![CDRL Type] = "Customer Request" Then
Me![Label75].ForeColor = 0
Me![Response Due].ForeColor = 0
Me![Label68].ForeColor = 0
Me![CDRL Type].ForeColor = 0
If Me![CDRL Type] <> "Approval" Then
Me![Response Due].Visible = False
Me![Label75].Visible = False
Else
Me![Label75].ForeColor = lngRed
Me![Response Due].ForeColor = 255
Me![Label68].ForeColor = 255
Me![CDRL Type].ForeColor = 255
If Me![XMTL Date] <> Me![Response Due] Then
Me![Response Due].Visible = True
Me![Label75].Visible = True
Else
Me![Response Due].Visible = False
Me![Label75].Visible = False
End If
End If
If Me![CDRL Type] <> "Concurrence" Then
Me![Response Due].Visible = False
Me![Label75].Visible = False
Else
Me![Label75].ForeColor = 255
Me![Response Due].ForeColor = 255
Me![Label68].ForeColor = 255
Me![CDRL Type].ForeColor = 255
If Me![XMTL Date] <> Me![Response Due] Then
Me![Response Due].Visible = True
Me![Label75].Visible = True
Else
Me![Response Due].Visible = False
Me![Label75].Visible = False
End If
End If
If IsNull(Me![DID Number]) Then
Me![DID Number].Visible = False
Me![Label114].Visible = False
Else
Me![DID Number].Visible = True
Me![Label114].Visible = True
End If
Me![CDRLNbr] = calc_cdrl([CDRL Number], [Expr1], [Expr2])
End If
End Sub
Last edited by a moderator: