I have a report that is bound to a table with an ssn field in it (the ssn is captured as a string value). The report has the ssn field bound to a text box.
I would like the text box back colour to turn red if the first 3 numbers of the ssn value is "999".
The code I wrote is on the On Activate event of the report and, though it doesn't give any errors, it doesn't turn the 999 ssn's text box back colour red..
Any help as to what I'm doing incorrect is appreciated..
code:
If Left(Trim(Me.txt_SubSSN), 3) = "999" Then
Me.txt_SubSSN.BackColor = vbRed
Me.lbl_SSN.BackColor = vbRed
End If
I would like the text box back colour to turn red if the first 3 numbers of the ssn value is "999".
The code I wrote is on the On Activate event of the report and, though it doesn't give any errors, it doesn't turn the 999 ssn's text box back colour red..
Any help as to what I'm doing incorrect is appreciated..
code:
If Left(Trim(Me.txt_SubSSN), 3) = "999" Then
Me.txt_SubSSN.BackColor = vbRed
Me.lbl_SSN.BackColor = vbRed
End If