Coding question!
Form:
Combo1 Yes/No
Combo2 Yes/No/Not Applicable
Combo3 Yes/No
Combo 4 Yes/No Not Applicable
Textbox label "Compliance?"
Textbox ""
If any combobox = No then display "No" in vbRed in Textbox
If all comboboxes = Yes or NOt Applicable then display "Yes" in compcolor (predefined variable).
However the textbox doesn't update correctly when I click my "verify" button. It either stays "Yes" or "No" or "Not Applicable" based on the first selection.
Does this need to be a If/And/Else situation, and how do I code it to properly work?
Form:
Combo1 Yes/No
Combo2 Yes/No/Not Applicable
Combo3 Yes/No
Combo 4 Yes/No Not Applicable
Textbox label "Compliance?"
Textbox ""
If any combobox = No then display "No" in vbRed in Textbox
If all comboboxes = Yes or NOt Applicable then display "Yes" in compcolor (predefined variable).
Code:
'NON-COMPLIANCY
If Me.Pain_IniPain = "No" Then
Me.Text67 = "No"
Me.Text67.ForeColor = vbRed
End If
'COMPLIANCY
If Me.Pain_IniPain = "Yes" Then
Me.Text67 = "Yes"
Me.Text67.ForeColor = compcolor
End If
'NOT APPLICABLE = COMPLIANCY
If Me.Pain_InterPain = "Not Applicable" Then
Me.Text67 = "Yes"
Me.Text67.ForeColor = compcolor
End If
However the textbox doesn't update correctly when I click my "verify" button. It either stays "Yes" or "No" or "Not Applicable" based on the first selection.
Does this need to be a If/And/Else situation, and how do I code it to properly work?