Change backcolor in repot conditionally (1 Viewer)

EddP

New member
Local time
Today, 18:57
Joined
Jul 12, 2018
Messages
8
Hi, always helpful here, thx
I have a report that I want to change all the fields when ever the field name is matched.
field-name - Move Request
desired result, change to yellow if (value) ="Move Request"
I can do one of these using the conditional format tool but I want all the other fields to change as well.
Where would I use the expression, On Open or On Load and what is the color code to use?

I tried #FFF200 and vbyellow to no success

I have written this before with no issue in MS Access 213 but the 2016 version is different.
 

Ranman256

Well-known member
Local time
Today, 18:57
Joined
Apr 9, 2015
Messages
4,339
You can set to generic colors
TxtBox.forecolor = vbRed

Or to use FFF200
It is RGB so use the calculator app, set to scientific,hexdecimal, enter them 2 letters at a time,
Enter FF to get the decimal# ,click Decimal,
The results will be,
TxtBox.forecolor = RGB(255,242,0)
 
Last edited:

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 06:57
Joined
May 7, 2009
Messages
19,169
you can still do it with Conditional Formatting. just select All the controls (textboxes) and apply the formatting you want.
 

EddP

New member
Local time
Today, 18:57
Joined
Jul 12, 2018
Messages
8
Hello, the conditional format tool isn't working the way I wanted. I want it to change the back color of all field names when a field on a report is true.
I'm my 2003 database I would simply write this and it would work. See below.
I have a field called [Request Type] and when the value equals text "Move Request" I wanted the other fields on the report to change the back color to yellow. If I can get one line to work than I can write the rest.
[Request Type] is a field name
[Move No] is a field name

If Me.Request_Type.Value = "Move Request" Then Me.Move_No.BackColor = FFF200
 

GinaWhipp

AWF VIP
Local time
Today, 18:57
Joined
Jun 21, 2011
Messages
5,901
If you review the link I posted it will work in an Access 2003 database. Just review the instructions.
 

EddP

New member
Local time
Today, 18:57
Joined
Jul 12, 2018
Messages
8
sorry, I didn't make myself clear.
I am now using MS Access 2016 and not 2003, sorry
 

EddP

New member
Local time
Today, 18:57
Joined
Jul 12, 2018
Messages
8
that's why I am confused, it didn't work for me.
see attached
 

Attachments

  • back_color.png
    back_color.png
    19.9 KB · Views: 71

GinaWhipp

AWF VIP
Local time
Today, 18:57
Joined
Jun 21, 2011
Messages
5,901
It does not go there. It goes in a control on the Form, refer to Step 1, it tells you to put a control on the Form. You set the Control's Font Color to the color and put the Statement as the Control Source. Then to complete follow the other steps...
 

Users who are viewing this thread

Top Bottom