J
JD
Looking for a hand in understanding case statements. Looked up MSFT examples
as well as some of the posts here, but it's not sinking in. I'm tyring to
create a case statement that evaluates the value of a combo box and sets the
value of other combo boxes depenending on whats in it. I'm lost, any help
would be appreciated.
I can do the same tasks with if then's, but it would be messy. New to
coding, any help would be really apprecaited.
Tried a couple variations of the following but it does not work.
Private Sub Combo1_AfterUpdate()
Dim verify as string
verify = me.combo1.value
Select Verify
Case1
verify ="ABC"
Case2
verify ="DEF"
End Select
Select Case Verify
Case1
combo2.value ="true"
combo3.value ="N/A"
Case2
combo2.value ="false"
combo3.value ="true"
End Select
End Sub
as well as some of the posts here, but it's not sinking in. I'm tyring to
create a case statement that evaluates the value of a combo box and sets the
value of other combo boxes depenending on whats in it. I'm lost, any help
would be appreciated.
I can do the same tasks with if then's, but it would be messy. New to
coding, any help would be really apprecaited.
Tried a couple variations of the following but it does not work.
Private Sub Combo1_AfterUpdate()
Dim verify as string
verify = me.combo1.value
Select Verify
Case1
verify ="ABC"
Case2
verify ="DEF"
End Select
Select Case Verify
Case1
combo2.value ="true"
combo3.value ="N/A"
Case2
combo2.value ="false"
combo3.value ="true"
End Select
End Sub