Conditional Formatting for Form in Access

I have a form named frm_showlist that is in datasheet view. I need to do some VBA conditional formatting that basically goes like this

if Status_id = 1 format all the fields in the record in red
if Status_id = 2 format all the fields in the record in blue
if Status_id = 3 format all the fields in the record in brown
if Status_id = 4 no formatting
if Status_id = 5 format all the fields in the record in purple

I can do the conditional formatting in access but it only applies to the cell in question, I cant do it across the board for all the fields in the record

thanks in advance,
Who is Participating?
Rey Obrero (Capricorn1)Connect With a Mentor Commented:
did you select all the cells when you create the conditional formatting?
hnasrConnect With a Mentor Commented:
As capricorn1 suggested.
Select all controls in record, select new rule, apply expression: [Status_id] = 1, select format
For no format set it to automatic.
damixaAuthor Commented:
Great, thanks. Much appreciated
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.