Hi everyone,
I have a drop down field in which a user can select one of many items. In that drop down, there are 2 items that when they are selected, three other fields become "visible" and the user would fill in these other 3 fields, otherwise they would remain invisible. Here is my code on the main drop down:
Private Sub cboTypeOfIssue_BeforeUpdate(Cancel As Integer)
' This will set the ATC sub category to be visible if Access To Care is selected
If cboTypeOfIssue = "Access To Care - ATC/QOC/QOS/COC/TOC" Or cboTypeOfIssue = "Grievance" Then
cboATCReason.Visible = True
cboATCspecialist.Visible = True
cboATCcounty.Visible = True
ElseIf cboTypeOfIssue <> "Access To Care - ATC/QOC/QOS/COC/TOC" Or cboTypeOfIssue <> "Grievance" Then
cboATCReason.Visible = False
cboATCspecialist.Visible = False
cboATCcounty.Visible = False
End If
End Sub
PROBLEM: The fields that should be invisible (all of the time unless the result is a "true" as defined above) is not the case. The fields are invisible when you first select a type of issue that is not related to the true statements above, but if you go out of the case and go back in, the fields are now visible?
Any ideas? Let me know if this is unclear...Thanks!
I have a drop down field in which a user can select one of many items. In that drop down, there are 2 items that when they are selected, three other fields become "visible" and the user would fill in these other 3 fields, otherwise they would remain invisible. Here is my code on the main drop down:
Private Sub cboTypeOfIssue_BeforeUpdate(Cancel As Integer)
' This will set the ATC sub category to be visible if Access To Care is selected
If cboTypeOfIssue = "Access To Care - ATC/QOC/QOS/COC/TOC" Or cboTypeOfIssue = "Grievance" Then
cboATCReason.Visible = True
cboATCspecialist.Visible = True
cboATCcounty.Visible = True
ElseIf cboTypeOfIssue <> "Access To Care - ATC/QOC/QOS/COC/TOC" Or cboTypeOfIssue <> "Grievance" Then
cboATCReason.Visible = False
cboATCspecialist.Visible = False
cboATCcounty.Visible = False
End If
End Sub
PROBLEM: The fields that should be invisible (all of the time unless the result is a "true" as defined above) is not the case. The fields are invisible when you first select a type of issue that is not related to the true statements above, but if you go out of the case and go back in, the fields are now visible?
Any ideas? Let me know if this is unclear...Thanks!