Clyde,
I am trying to do something similar in my continuous form, but I want the text in the field to change to red after update.
This is how I modified the code, but it doesn't work. What am I doing wrong?
Private Sub Form_Current()
Dim ctl As Control, strForm As String
Dim CurrentRecord As Variant
On Error Resume Next
'change YourID here to your primary key
CurrentRecord = Me!MainID
For Each ctl In Me.Controls
With ctl
If .Tag = "CF" Then
With Me.Controls(ctl.Name).FormatConditions _
.Delete
End With
'change YourID here to your primary key
With Me.Controls(ctl.Name).FormatConditions _
.Add(acExpression, , "[MainID]=" & CurrentRecord)
.ForeColor = vbRed
End With
End If
End With
Next ctl
End Sub
I even tried this code in the AfterUpdate event of the particular field that I want the text color to change in.
Can you help me?
Jerome Benton
JERPAT Web Designs
GOD Is Good All The Time!!!