[AccessD] Color Field on Continuous Form based on Field Value

Gustav Brock gustav at cactus.dk
Sat Sep 24 16:35:39 CDT 2022


Hi David

You could write a tiny 1 x 1 pixel BMP file on the fly from a skeleton, only exchanging the three RGB bytes..
It is only 58 bytes starting with BM:

000102030405060708090A0B0C0D0E0F
--------------------------------
424D3A00000000000000360000002800
00000100000001000000010018000000
00000400000000000000000000000000
000000000000BE927000

Here, the BGR colours to modify are the three bytes BE 92 70, in Access displayed as #7092BE.

Then, bind the created BMP files to a picture control on the form.
That can be done as shown in my article:

GustavBrock/VBA.PictureUrl: Download and display pictures directly from URLs (github.com)<https://github.com/GustavBrock/VBA.PictureUrl>

/gustav


Fra: David Emerson<mailto:newsgrps at dalyn.co.nz>
Sendt: 24. september 2022 21:43
Til: AccessD<mailto:accessd at databaseadvisors.com>
Emne: [AccessD] Color Field on Continuous Form based on Field Value

Hi Listers,

I am familiar with using Conditional Formatting to color a field based on a
fixed list of colors.

I have a continuous form where the user selects a different color for each
record using the color picker and storing the color value in a field.  This
color value is then used elsewhere in the program.

This means that the color can be any of hundreds of possible colours.

What I would like to do is have the background of the field (or something
else) colored in the color so the user can see what colors have been chosen
across all the records showing on the continuous form.  Does anyone know a
way of doing this?

Regards

David Emerson
Dalyn Software Ltd
Wellington, New Zealand



More information about the AccessD mailing list