Conditional Formatting

D

dave

Is there any way to have more than three conditions when using conditional
formatting for a field in a form?
 
L

Larry Linson

If the form is in single form view, not continuous forms view, then, yes,
you can use VBA code on the OnCurrent event of the Form and on the
BeforeUpdate event of the control. If the Conditional Formatting isn't
enough, check MVP Stephen Lebans' site, http://www.lebans.com -- he has some
workarounds that might give you more flexibility (they were created for
Access 97 or earlier, where there was not yet Conditional Formatting in the
product, but might be adaptable).

Larry Linson
Microsoft Access MVP
 
S

Stephen Lebans

You can only have 3 preset FormatCondition objects setup with the
exposed props(Back/Fore Color/Font etc.). SO for instance you can only
ever have a total of 3 different Backcolors available for an individual
control using Conditional Formatting. You can simulate more criteria
though by having a function evaluated by placing a custom function name
in the Expression is input control of the CF GUI Dialog. See:
http://www.lebans.com/conditionalformatting.htm
--

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

Stephen Lebans

Hi Larry,
that older A97 FormatByCriteriaSubclassing solution will work in A2K.
THe problem is the subclassing bug introduced with the A2K VB IDE. To
get around this bug an external Subclassing DLL should be used in place
of the existing inline subclassing code. I have never bother updating
this solution as I find that Conditional Formatting, despite the 3
condition limit, solves 99% of the CF requirements out there.
:)
--

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top