Example Apps for Businesses, Schools & Developers

Version 2.22           Updated 6 Nov 2021                 Approx 0.6 MB

This is a companion to the Colour Converter / Selector example application.

In earlier versions of Access, users were limited to 3 conditional formats (or 4 colours including the default colour)

This limit applied whether using VBA or the conditional formatting wizard

With the release of Access 2010 , a significant improvement was made with up to 50 colour formats available using the conditional formatting wizard
. . . BUT the 3 colour limit still applies using VBA.

An unlimited number of colour formats can in fact be obtained in VBA without using conditional formatting.
Instead, the colour formats are stored in a lookup table.

This example demonstrates the use of this approach for indicating student test scores.

ColourConditions1
The test scores are displayed with background and foreground colours depending on its value

The colours are specified in 10% ranges from 0 to 100% (but any set of values can be used as required)

ColourConditions2
A colour picker dialog can be used to set each of the colours

ColourPicker

This approach will work in any Access version from Access 2000 onwards (32-bit or 64-bit)



Download

The attached zip file includes both ACCDB & MDB (2000) formats

Click to download:     Colour Conditions     Approx 0.6 MB  (zipped)



Feedback

Please use the contact form below to let me know whether you found this article interesting/useful or if you have any questions/comments.

Do let me know if you find any bugs in the application.

Please also consider making a donation towards the costs of maintaining this website. Thank you



Colin Riddington                       Mendip Data Systems                       Last Updated 6 Nov 2021



Return to Example Databases Page




Return to Top