Hi,
I have a continous form with multiple controls. I would like to have the conditional formating for these controls using VBA on onLoad event.
What do i do wrong?
thanks
Andrew
I have a continous form with multiple controls. I would like to have the conditional formating for these controls using VBA on onLoad event.
Code:
Private Sub Form_Load()
Dim ctr As Control
Dim frm As Form
Dim fc As FormatCondition
Set frm = Forms(tb)
For Each ctr In frm.Controls
Set fc = ctr.FormatConditions.Add(acExpression, 0, "ID = txt13", "")
ctr.FormatCondition.BackColor = vbRed
Next ctr
End Sub
What do i do wrong?
thanks
Andrew