Conditional formatting changes field enabled property?

S

Stephen Lebans

Instead of If-Then-Else use the Select statement. It's cleaner and easier to
implement for this situation.

Your logic is correct for persisting the users color selection.. Add a
CommandButton or similiar to your form that allows the user to Select the
desired CF color. Save the color to a table. In the main Form's Load event,
set the FomatConditions object props for this control to the previously
saved color value.
It's better to set the FormatConditions object at runtime as there is a Bug
where CF does not respect the Enabled property when set via the CF GUI.

There is code in the CF sample on my Web site showing you how to do this.
Just post back if you are having any issues implementing your logic.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
A

Anthony

Thank you very much for your advice. Everyone is always so gracious with
advice on these forums. I will check into the Select statement for
programming this. As for setting the color, I was going to use your color
selection applet with the form's Dbl-click event instead of a button.
 
A

AJ

Anthony, go back and reread my previous post in this thread. You are not
limited to evaluating3criteria. You are limited to3fixed
FormatConditions. As I stated in my previous post, you can write your own
function, evaluating as many criteria as desired, and have the function
return True or Flase depending if you want CF to paint the control or not.

--

HTH
Stephen Lebanshttp://www.lebans.comAccessCode, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.




...

read more »

How do I give different colours for different conditions? Pls help.
 
Top