[AccessD] Setting Back Color of a label
Rocky Smolin
rockysmolin at bchacc.com
Sat Apr 8 23:51:57 CDT 2017
Ok I figured it out - the RGB is reversed from what is shown in the property
sheet. So the property sheet value #FFA3A3 in VBA has to be &HA3A3FF.
The green worked because the first two hex digits are the same as the last
two digits.
r
-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
Rocky Smolin
Sent: Saturday, April 08, 2017 9:42 PM
To: 'Access Developers discussion and problem solving'; 'Off Topic'
Subject: [AccessD] Setting Back Color of a label
Dear List(s):
In the after update event of an option control I test it and set the back
color of a label to green(ish) if True and red(ish) if false.
The red(ish) color is #FFA3A3 which is the default color set in the property
sheet. The gren(ish) color is #DCFCDC.
The code:
If Me.fldSCOTaskCompleteConfirmGo = True Then
' Make It Green
Me.lblConfirmCRSIsaGofromCLNT.BackColor = &HDCFCDC
Else
' Make It Red
Me.lblConfirmCRSIsaGofromCLNT.BackColor = &HFFA3A3
End If
Changing the option control from false to true turns the back color of the
label green(ish). Good!
Changing the option control from true to false changes the back color of the
label not ref but to purple(ish). Bad!
Google has failed me.
Does anyone know why this difference between the color in the property sheet
and setting it through VBA?
MTIA
Rocky Smolin
Beach Access Software
760-683-5777
<http://www.bchacc.com> www.bchacc.com
<http://www.e-z-mrp.com> www.e-z-mrp.com
Skype: rocky.smolin
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
More information about the AccessD
mailing list