VBA Help - More MS Access

Marc

TPer Emeritus
Messages
34,835
Edit My Images
Yes
As I got such good help the last time I thought I'd pose another question.

I have downloaded a module for Access that turns a form field yellow when it is active. The only thing is that the colour is quite insipid and not as obvious as I'd like. I have gone into the vba code but the colour code seems a bit strange. It's described as an RGB code but doesn't look like one to me. :shrug:

Code is below, anyone know the code for a darker yellow?

'The RGB value to use as a control's Back Color when it has focus.
Private Const mlngcFocusBackColor = &HB0FFFF
 
The &H signifies Hexadecimal and the B0FFFF is the Hex value.

The decimal value equivalent is 11599871

If you know RGB values then you can specify it this way. This is slightly darker yellow.
The best way is to choose the color using the form designer. You can then see the RGB values.

Label0.Backcolor = RGB(244,238,0)
 
That's a very strange hex for a yellow. Looks more like a blue to me :lol:

Usually for yellow you keep the red and green high, and about the same, and keep blue very low. then move blue higher/lower to get the right colour. Pretty much like RVs sample.

Good site for calculating and previewing the colour:

http://www.dcs.napier.ac.uk/~mm/im/hexconverter.htm
 
Back
Top