T
Todd C
Hello All;
Not sure if this is the right place for this post, but I did not see any
"Access General Questions"
Here goes:
I am using Access 2007 and trying to set the BackColor property of a text
box on a form using VBA Code in the Form_Open event with code like this:
Me.txtName.BackColor = <some global variable>
Here's the thing: In order to get the correct color numer, I first pick my
desired color from the palette to see its value. In this case, a very bright
red comes up as #ED1C24.
In Access 2003 and earlier, this value would be represented as a long
integer, not a Hex. So, to get the HEX value converted to a long integer, I
use this:
<some global variable> = Clng("&H" & "ED1C24")
which evaluates to 15539236. But when the form opens, the text box comes up
in bright blue, not bright red.
Is something wrong with my Hex to Long conversion? Why did Microsoft change
the BackColor property of form and report objects from long integer
representation to Hex? Is it "ED1C24" even Hex?
This was SOOOOOOO much easier in version 2003!
Please help.
Not sure if this is the right place for this post, but I did not see any
"Access General Questions"
Here goes:
I am using Access 2007 and trying to set the BackColor property of a text
box on a form using VBA Code in the Form_Open event with code like this:
Me.txtName.BackColor = <some global variable>
Here's the thing: In order to get the correct color numer, I first pick my
desired color from the palette to see its value. In this case, a very bright
red comes up as #ED1C24.
In Access 2003 and earlier, this value would be represented as a long
integer, not a Hex. So, to get the HEX value converted to a long integer, I
use this:
<some global variable> = Clng("&H" & "ED1C24")
which evaluates to 15539236. But when the form opens, the text box comes up
in bright blue, not bright red.
Is something wrong with my Hex to Long conversion? Why did Microsoft change
the BackColor property of form and report objects from long integer
representation to Hex? Is it "ED1C24" even Hex?
This was SOOOOOOO much easier in version 2003!
Please help.