I have a button called cmdImage. Caption = "Attachment" and ForeColor = TextDark.
I want it to display "No Attachment" in red when empty, and "Attachment" in Text Dark when it's not. That way, I will not have to click on the button to see if there are any attachments.
I created the following code:
If IsNull(DLookup("EventAttachment", "Event", "CompanyID = " & Me.txtCompanyID)) Then
Me.cmdImage.Caption = "No Attachment"
Me.cmdImage.ForeColor = vbRed
Else
Me.cmdImage.Caption = "Attachment"
Me.cmdImage.ForeColor = vbBlue
End If
The problem is: vbBlue is not the Text Dark blue I was using.
I tried: Me.cmdImage.ForeColor = RGB(0, 0, 100)
but it is just not the same color as the Text Dark.
How do I get it to leave the default values or to put the correct color blue back?
Or, should the above code be written differently?
I want it to display "No Attachment" in red when empty, and "Attachment" in Text Dark when it's not. That way, I will not have to click on the button to see if there are any attachments.
I created the following code:
If IsNull(DLookup("EventAttachment", "Event", "CompanyID = " & Me.txtCompanyID)) Then
Me.cmdImage.Caption = "No Attachment"
Me.cmdImage.ForeColor = vbRed
Else
Me.cmdImage.Caption = "Attachment"
Me.cmdImage.ForeColor = vbBlue
End If
The problem is: vbBlue is not the Text Dark blue I was using.
I tried: Me.cmdImage.ForeColor = RGB(0, 0, 100)
but it is just not the same color as the Text Dark.
How do I get it to leave the default values or to put the correct color blue back?
Or, should the above code be written differently?