chris-uk-lad
Registered User.
- Local time
- Today, 13:04
- Joined
- Jul 8, 2008
- Messages
- 271
Hi all,
Have a problem with a textbox in a form! I have several static textboxes which relates to a field inside linked table. In each of these i want them to change the text colour if the value is 100. Ive tried the below but doesnt work, assuming that syntax is slightly different for form text boxes?
Thanks
Have a problem with a textbox in a form! I have several static textboxes which relates to a field inside linked table. In each of these i want them to change the text colour if the value is 100. Ive tried the below but doesnt work, assuming that syntax is slightly different for form text boxes?
Code:
Private Sub txtRatio1_BeforeUpdate(Cancel As Integer)
If (frmSummary.txtRatio1.Value = "100") Then
txtRatio1.ForeColor = vbGreen
Else
txtRatio1.ForeColor = vbRed
End Sub
Thanks