I’m attempting to set the backcolor property of a text box control using the ‘On Format’ event property of a report’s detail section.Â I’ve been doing this sort of stuff for 10 years.
I want the backcolor to be green.Â When setting this property from the ‘…’ choice in properties, the resulting value is ‘#22B14C’.Â Note that I’m totally surprised by such a bizarre value as I’ve only gotten Long Integer values in the past.
Well, when I go to code to set the backcolor value:Â txtConditional.backcolor = #22B14C, I get an error indicating that value can’t begin with a ‘#’ sign.Â So I go ahead and wrap the value in double quotes: “#22B14C”.Â I don’t get an error in code.
I choose the ‘View’ choice in the upper left hand corner of the report’s design view and it previews successfully.Â Some of my rows are green, and some are red.Â However, when I go to ‘print preview’ (btw, what the heck is the ‘View’ choice for, then?) I get an error telling me that the “#22B14C” value is incorrect.
Well that’s just great!Â So now, I’ve got to go Google and figure out how to properly set this value.
Â Conclusion:Â Microsoft changed everything around like item above, and didn’t test, and didn’t take into account the thousands of experienced Access Developers.Â More to come!
President Data Control, LLC and
15 year Access Veteran