MysticElaine
Registered User.
- Local time
- Today, 01:26
- Joined
- May 26, 2014
- Messages
- 24
Hello,
I have a form that has some controls whose properties are already listed as required in the table. However, it also has a combo box labeled "Outcome" that changes what textboxes are enabled depending on what is chosen in that combobox. What I would like to do, is make sure that whatever textboxes are enabled are also required. Is this possible? Here is my code for the Outcome combo
I have a form that has some controls whose properties are already listed as required in the table. However, it also has a combo box labeled "Outcome" that changes what textboxes are enabled depending on what is chosen in that combobox. What I would like to do, is make sure that whatever textboxes are enabled are also required. Is this possible? Here is my code for the Outcome combo
Code:
Private Sub Outcome_Change()
If [Outcome] = "Pending" Then
[Date Provided].Enabled = False
[Date Provided] = Null
[Providers].Enabled = False
[Providers] = Null
[Number of Pages].Enabled = False
[Number of Pages] = Null
[Time].Enabled = False
[Time] = Null
[Cost].Enabled = False
[Cost] = Null
[Comments].Enabled = True
Else
If [Outcome] = "Interpretation" Then
[Date Provided].Enabled = True
[Providers].Enabled = True
[Number of Pages].Enabled = False
[Number of Pages] = Null
[Time].Enabled = True
[Comments].Enabled = True
Else
If [Outcome] = "Translation" Then
[Date Provided].Enabled = True
[Providers].Enabled = True
[Number of Pages].Enabled = True
[Time].Enabled = True
[Comments].Enabled = True
Else
[Date Provided].Enabled = False
[Date Provided] = Null
[Providers].Enabled = False
[Providers] = Null
[Number of Pages].Enabled = False
[Number of Pages] = Null
[Time].Enabled = False
[Time] = Null
[Cost].Enabled = False
[Cost] = Null
[Comments].Enabled = True
End If
End If
End If
End Sub