Hello all.
Here's the layout:
Criteria 1: Yes/No/Not Applicable - Enabled
Criteria 2: TextBox - Disabled unless Criteria 1 = "No"
Code:
After completion: Hit button - add new record, form goes blank.
Issue: Pain_ElapMin remains enabled and Label91 remains vbRed.
The second part of the code is obviously not working and I'm not sure why (I'm an amateur so be nice!) I would like the fields to become disabled until Criteria 1 is met again.
Thanks!
Here's the layout:
Criteria 1: Yes/No/Not Applicable - Enabled
Criteria 2: TextBox - Disabled unless Criteria 1 = "No"
Code:
Code:
Private Sub Pain_Elap_AfterUpdate()
If Me.Pain_Elap.Text = "No" And Len(Me.Pain_ElapMin & "") = 0 Then
MsgBox "Enter total time elapsed if pain is not addressed within 10 minutes of initial assessment."
If Len(Me.Pain_ElapMin & "") = 0 Then
Me.Pain_ElapMin.Enabled = True
Me.Pain_ElapMin.SetFocus
Me.Pain_ElapMin.ForeColor = vbRed
Me.Label91.ForeColor = vbRed
Else
If Me.Pain_Elap.Text <> "No" And Len(Me.Pain_ElapMin & "") = 0 Then
Me.Pain_ElapMin.Enabled = False
Me.Pain_Remark.SetFocus
End If
End If
End If
End Sub
Issue: Pain_ElapMin remains enabled and Label91 remains vbRed.
The second part of the code is obviously not working and I'm not sure why (I'm an amateur so be nice!) I would like the fields to become disabled until Criteria 1 is met again.
Thanks!