Code to change field color?

  • Thread starter Thread starter Greg Smith
  • Start date Start date
G

Greg Smith

I was searching the forums awhile back and came across a
post that showed how to change the color of a field.

I cannot seem to locate that post. Does anyone know the
code to change the color of a custom field?
 
Under the advance properties, you can chage the backcolor.
The message that I found was if a user enters in incorrect
information into a field, you could use code to change the
field to a red color so the user knows which field is
incorrect.
-----Original Message-----
Can you be a little more specific about what you're
trying to do? Custom fields have data values. I'm not sure
where color fits into your needs.
 
What you're really asking is how to change the backcolor of the CONTROL that DISPLAYS the field. In the world of Outlook Forms, a few "mysteries" are solved once you get used to the distinction of fields vs. controls.

In your code:

Set myControls = Item.GetInspector.ModifiedFormPages("Message").Controls
myControls("txtTextBox").BackColor = vbRed

--
jcf

| Under the advance properties, you can chage the backcolor.
| The message that I found was if a user enters in incorrect
| information into a field, you could use code to change the
| field to a red color so the user knows which field is
| incorrect.
|
| >-----Original Message-----
| >Can you be a little more specific about what you're
| trying to do? Custom fields have data values. I'm not sure
| where color fits into your needs.
| >--
| >Sue Mosher, Outlook MVP
| >Outlook and Exchange solutions at http://www.slipstick.com
| >Author of
| > Microsoft Outlook Programming: Jumpstart
| > for Administrators, Power Users, and Developers
| > http://www.slipstick.com/books/jumpstart.htm
| >
| >
| | >> I was searching the forums awhile back and came across
| a
| >> post that showed how to change the color of a field.
| >>
| >> I cannot seem to locate that post. Does anyone know the
| >> code to change the color of a custom field?
| >>
| >.
| >
 
Back
Top