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 TextDark 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:
The problem is: vbBlue is not the TextDark blue I was using.
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 TextDark 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:
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 TextDark blue I was using.
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?