Hello,
I having some problems with a form where I have it set to Continuous Forms. I have a text box that I want to turn Red when a condition is met but when the condition is true it turns all of the text boxes red and not just the one on the current form I have focus on.
Is there any way to do with this VBA? I have created the condition in VBA just cant figure out the form part.
Appreciate any help!
Thanks
Slen
Working in Access 2007
Here is the code for the conditional expression
I having some problems with a form where I have it set to Continuous Forms. I have a text box that I want to turn Red when a condition is met but when the condition is true it turns all of the text boxes red and not just the one on the current form I have focus on.
Is there any way to do with this VBA? I have created the condition in VBA just cant figure out the form part.
Appreciate any help!
Thanks
Slen
Working in Access 2007
Here is the code for the conditional expression
Code:
Dim objFrc As FormatCondition
Me![txtBox].FormatConditions.Delete
Set objFrc = Me.Record_Number.FormatConditions.Add(acExpression, acEqual, Me.CheckBox.Value = True)
Select Case CheckBox.Value
Case True
With Me![txtBox].FormatConditions(0)
.BackColor = vbRed
End With
End Select
Comment