Textbox Background colour for continuous forms (1 Viewer)

ben.hornshaw

Registered User.
Local time
Today, 11:17
Joined
May 30, 2009
Messages
21
Hi All

I have a table of colours. one of the field contains the access numeric code for a colour which is i copy and paste into the background colour property of a text box changes it to that colour

i have found a VB script that does this automatically on load but what i want is to have a continuous form and for each record the bacground is the colour set in its own field. ie
Record 1 blue
record 2 red
record 3 green

so in the continuous form they display
Record 1
Record 2
Record 3

Obvously it would be the background that was the colour not the text but you get the idea!

Thanks

 
As a rule formatting of this kind for continuous forms (as well as datasheet forms) can only be done thru Conditional Formatting off of the Formatting Menu, not thru VBA code.

Are you actually talking about only three records with only three colors, or repeting every three records of the recordset or what?
 
Take a look at this demo I posted a while back. This covers what you need

Demo
 
you can't set different rows of a continous form to different colour arbitrarily. all you really have is a single row, with the same attributes repeated.

MS added conditional formatting which gives you 4 options, but its a workround, rather than an intrinsic property.
 
thank you for your replies

i had a look at DCrake's demo. Thanks for that its kind of wat i was originally thinking. the reason i dont want to go with that is that i need more than just 3 diffferent colour, even more that 10, more like 150 and therefore i didnt want to go down the road of adding bitmap images o the database making it huge. i simply wanted to use the access colour picker to choose.

Any more ideas

The background is that i work in the entertainment industry and i am creating a database of colour that can be used in front of a light, hence loads, i want the user to be able to select some ie green red yellow etc and the to display them in a form as the actual colour instead of the name! visual is always better than text

Thanks
 
Then why not use the common dialog control to bring up the colour palette instead then they can choose a any pantone they require.

David
 
i dont know how to do this or if it would help what i want

can you explain more??
 

Users who are viewing this thread

Back
Top Bottom