Jan Lichtenbelt
New member
- Local time
- Tomorrow, 00:30
- Joined
- Nov 29, 2008
- Messages
- 9
I have a form showing a table with 11 fields en 10 records. I want backcolors for special records in special fields. I have in pricipal more than 3 conditions (not all conditions are shown here), thus I want to write the conditions myself.
The first field name is: "Counter" with values 1 to 10, the second field name is "Solution" (a text field).
Laoding the form with:
Private Sub Form_Load()
Dim objCond As FormatConditions
Me!Solution.FormatConditions.Delete
Set objCond = Me.Solution.FormatConditions.Add(acExpression, , Me.Counter.Value = 3)
Set objCond = Me.Solution.FormatConditions.Add(acExpression, , Me.Counter.Value <> 3)
Me!Solution.FormatCondition(0).BackColor = RGB(255, 0, 0)
Me!Solution.FormatCondition(1).BackColor = RGB(0, 255, 0)
Set objCond = Nothing
End Sub
Fails with the error message Type mismatch for Set ObjCond...
Who can help me to work backcoloring my table in a Form on special places?
Jan Lichtenbelt
The first field name is: "Counter" with values 1 to 10, the second field name is "Solution" (a text field).
Laoding the form with:
Private Sub Form_Load()
Dim objCond As FormatConditions
Me!Solution.FormatConditions.Delete
Set objCond = Me.Solution.FormatConditions.Add(acExpression, , Me.Counter.Value = 3)
Set objCond = Me.Solution.FormatConditions.Add(acExpression, , Me.Counter.Value <> 3)
Me!Solution.FormatCondition(0).BackColor = RGB(255, 0, 0)
Me!Solution.FormatCondition(1).BackColor = RGB(0, 255, 0)
Set objCond = Nothing
End Sub
Fails with the error message Type mismatch for Set ObjCond...
Who can help me to work backcoloring my table in a Form on special places?
Jan Lichtenbelt