We help IT Professionals succeed at work.

Access

timgreen7077
timgreen7077 asked
on
I have 5 bound check boxes that represent a color. I would like to select a check box and have it change for back color of a text box call txtID. right now if I select the check box it will change the back color of the box but it changes it for all the records and not just the 1 box. Also when I close the database and go back in the check it still there but the back color of the text box reverts back to white. I would like to select a check box and the color stay on the text field that the check box is selected for. any help will be great.
Comment
Watch Question

Can you post the form with the checkboxes?
To keep the value of the check box, I may suggets to use the Option Group and bound it into the table.

By  the way, Is your form continuous?

Sincerely,
Ed
If you are using a continuous form then what you see is how Access works.  Change one---change all.

In this type of form, the only option you have to get different colours in different records is using Conditional Formatting  (Format menu/ribbon). However, CF is quite limited in what it can achieve and from your description I'm not sure you will be able to do what you want.

Jim Dettman (EE MVE)President / Owner
Most Valuable Expert 2017
Most Valuable Expert 2012

Commented:

 As has been said, with a continuous form, you have only two choices:

1. Use conditional formatting

2. Bind the checkbox to a underlying field.

Attached is a sample DB that shows you how to use the a method which is a cross between the two.  However it doesn't rely on conditional formatting.

The sample shows coloring for the entire row, but by adding additional controls in the background, you can color individual row/columns as well.

 Holler if you have any questions.

Jim.
ContinuousFormColors.zip
timgreen7077Exchange Engineer
Distinguished Expert 2018

Author

Commented:
Here is the database and it is not a continuous form. Thanks for the assistance on this.
Laptop-Inventory.accdb
See the attached file. This might what you need.

Ed
Laptop-Inventory.accdb
timgreen7077Exchange Engineer
Distinguished Expert 2018

Author

Commented:
thanks