Change Textbox Color based on ID

G

Guest

Morning All

I am wanting to change the backcolor of a text box based on the ID of a
field on the form. I am using a continuous form and cannot use conditional
formatting as there will be more than 3 colors.

I have a table with a number of gangs in it, each with a unique ID, for each
instance of the ID on the form I want the text box to be the same color so:-

Gang ID 1 might be green, 2 blue, 3, yellow etc....

I do not know how many gangs there may be on the form but for each instance
of ID I want the text boxes to be the same color on the continuous form.

Thank You

Regards

Sonya
 
M

Marshall Barton

SL said:
I am wanting to change the backcolor of a text box based on the ID of a
field on the form. I am using a continuous form and cannot use conditional
formatting as there will be more than 3 colors.

I have a table with a number of gangs in it, each with a unique ID, for each
instance of the ID on the form I want the text box to be the same color so:-

Gang ID 1 might be green, 2 blue, 3, yellow etc....

I do not know how many gangs there may be on the form but for each instance
of ID I want the text boxes to be the same color on the continuous form.


You won't get much of an answer to this question without a
lot more specific information about what you are doing.
Where are you specifying which ID gets which color? How
many different gang IDs will you have? Which version of
Access are you using?

A continuous form has no features for dealing with an
arbitrary number of colors, so, even if we figure out some
tricky arrangement to get some colors, there wil always be a
limit on the number of colors. Also, the form's performance
will degrade as the number of colors and the number of
displayed records increases. For all practical purposes,
the form will probably be near unusable if you have more
than 10-13 different colors.
 

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