var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Conditional Formatting on Subform
I have a main form, Projects, with a subform, Agencies. Each project will have one or more Agencies. I have the Agency subform setup in the Continuous Forms View. All I want to do is change the color of a textbox (on the agency subform) if a field is null. My trouble is that this formatting wants to occur for all agencies and not just one of possible many.
So I guess my real question is how do I access each one of the agencies "form" and alter the color of a control?
If you use access97 you can use format property and put some text when field is null also you can change font color.
If you use newer version you can use format-menu and there 'format if... or conditional formating...' (I don't what it is in english version). There you can change also BackColor.
The "Conditional Formatting" works fabulous if the condition you want to test is the same field you wish to format.
What I want is If field A is = X then field B.backcolor = red (or something along these lines.
Now if I could just figure out how to do it...
I have conditional formating in CLITMIDT field and there is criteria/function/clause
[PCLUNT]="NA" Or [PCLUNT] Is Null
"What I want is If field A is = X then field B.backcolor = red (or something along these lines."
In B field use clause
Thank you mns. You have made my day.
I set Condition 1 to "Expression Is" and then I entered "myfield Is Not Null"
This works exactly as I wanted. I just wish I could have figured out how to code it in VB so it wasn't hidden away...
You could use something like this.
Private Sub Form_Open(Cancel As Integer)
Dim frm As FormatCondition
Set frm = Me.somefield.FormatConditions.Add(acExpression, , "'X'='X'")
frm.BackColor = 255