Solved Conditional format problem

John Sh

Active member
Local time
Tomorrow, 08:39
Joined
Feb 8, 2021
Messages
601
Is it possible to format one control to be the same colour as another control such as
control A = RGB() of control B
so that control A is always the same colour as control B without having to write an expression in control A for each possible state of control B with the same colour in each'
 
how about

controlA.BackColor=controlB.BackColor

where to place it? - perhaps form open, load or current event, perhaps when some control get the focus
 
Probably not plausible in a continuous form however a single form view or report would be fairly simple with some VBA in an event.
 
Is it possible to format one control to be the same colour as another control such as
control A = RGB() of control B
so that control A is always the same colour as control B without having to write an expression in control A for each possible state of control B with the same colour in each'
Based on the title of your thread, are you trying to do this using CF? If so, the answer would be "it depends." What is setting the colour of control B? If it's another set of CF, then you can try to use the same conditions on control A.
 
Based on the title of your thread, are you trying to do this using CF? If so, the answer would be "it depends." What is setting the colour of control B? If it's another set of CF, then you can try to use the same conditions on control A.
Firstly this is a continuous form and, yes, the conditional format of control B is dependent on the text in that control.
I'm trying to mirror the CF of control B in control A.
It looks like I'll have to duplicate control B format in control A.

I thank you all for the quick response and suggestions.
John
 
First select control B
then copy the format in control B with the format painter and paste that into control A.
I then had to alter the formats in control A from "xxxx" to [control B]= "xxxx"
I copied the "control B = " and pasted that to the front of each condition.
This seems to have worked in most cases but I still have one "valid" format that isn't working.

Thanks again to all.
 
you could select both controls and conditional format using the expression is [control B]= "xxxx" rather than field value is = 'xxxx' in control B. Then both controls have identical CF
 
you could select both controls and conditional format using the expression is [control B]= "xxxx" rather than field value is = 'xxxx' in control B. Then both controls have identical CF
Thanks. I'll give it a try.
 

Users who are viewing this thread

Back
Top Bottom