Really need help with handling a null!

Wag2016

Registered User.
Local time
Yesterday, 22:39
Joined
Mar 5, 2016
Messages
24
Hi Everyone.
I am working on a checklist with a question, a option group response (Yes, No, NA) and a Remark field. The remark field is required if No or NA are chosen.

I have code that turns the Remark field red from yellow if No or NA are chosen. (This red field will prompt them to end a remark). What I can't figure out is how to turn it back to yellow once they have entered a remark. Hope that makes sense.

What I have:
Code:
Private Sub SQ1F_Click()
If SQ1F = 2 Or SQ1F = 3 Then
Me.SQ1R.BackColor = RGB(255, 0, 0)
Else
Me.SQ1R.BackColor = RGB(255, 255, 204)
End If
End Sub

Please help - and thank you! :banghead:
 
Make your test

If (SQ1F = 2 Or SQ1F = 3) And Len(Me.Remark & vbNullString)=0 Then

And call it from both control's after update events.
 
Make your test

If (SQ1F = 2 Or SQ1F = 3) And Len(Me.Remark & vbNullString)=0 Then

And call it from both control's after update events.

Worked like a charm! My weary eyes thank you very much.
 
Happy to help!
 

Users who are viewing this thread

Back
Top Bottom