Changing a control's property using VBA

  • Thread starter Thread starter Charles
  • Start date Start date
C

Charles

I have a calculated control that sometimes results in a negative value. If
the value is negative, I would like to change the text color from black (0)
to Red (255). Any ideas on how to do this using VBA? Also, on what "Event"
do I perform the code?

Thank You

Charles
 
Thanks Al

Well that was easy, but how do I need to include the "Currency" format as
well?





Al Camp said:
Charles,
Format the field with...
+#[Black];-#[Red]
--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions

Charles said:
I have a calculated control that sometimes results in a negative value. If
the value is negative, I would like to change the text color from black (0)
to Red (255). Any ideas on how to do this using VBA? Also, on what "Event"
do I perform the code?

Thank You

Charles
 
Charles,
$ #.00[Black],-$ #.00[Red];.00
--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions

Charles said:
Thanks Al

Well that was easy, but how do I need to include the "Currency" format as
well?





Al Camp said:
Charles,
Format the field with...
+#[Black];-#[Red]
--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions

Charles said:
I have a calculated control that sometimes results in a negative value. If
the value is negative, I would like to change the text color from black (0)
to Red (255). Any ideas on how to do this using VBA? Also, on what "Event"
do I perform the code?

Thank You

Charles
 
Back
Top