G
Guest
I am trying to use a variable to represent text boxes on a form so that I can
cgahne the background colors of different boxes.
For I = 1 To 2
strWGT = "AVG_WT_" & LTrim(Str(I))
If [Forms]![Mil Spec Data Entry](strWGT) >= [WEIGHT SPEC] Then
[Forms]![Mil Spec Data Entry](strWGT).BackColor = 4259584
[Forms]![Mil Spec Data Entry](srtWGT).ForeColor = -2147483640
Else
[Forms]![Mil Spec Data Entry](strWGT).BackColor = 255
[Forms]![Mil Spec Data Entry](strWGT).ForeColor = 16777215
FailStatus = "FAIL"
End If
I keep getting 'Object doesn't support this property or method' error.
How can I get this to work??
cgahne the background colors of different boxes.
For I = 1 To 2
strWGT = "AVG_WT_" & LTrim(Str(I))
If [Forms]![Mil Spec Data Entry](strWGT) >= [WEIGHT SPEC] Then
[Forms]![Mil Spec Data Entry](strWGT).BackColor = 4259584
[Forms]![Mil Spec Data Entry](srtWGT).ForeColor = -2147483640
Else
[Forms]![Mil Spec Data Entry](strWGT).BackColor = 255
[Forms]![Mil Spec Data Entry](strWGT).ForeColor = 16777215
FailStatus = "FAIL"
End If
I keep getting 'Object doesn't support this property or method' error.
How can I get this to work??