if me.combo1.value = "depart1" and me.combo2.value = "task1" then
me.combo2.defaultvalue = "task2"
both combo has limit to list property though the "task2" is still in the list
What's the context? Do you have an existing record you're editing, or do you
want to set the default value after Combo1 and Combo2 have been selected?
What's the context? Are you setting the default value so that future records
will be task2?
I would expect that the AfterUpdate events of the two combo boxes would be the
appropriate place, and that rather than setting the DefaultValue property you
could just push "Task2" into the combo box:
Private Sub combo1_AfterUpdate()
If Me!combo1 = "depart1" AND Me!combo2 = "task1" Then
Me!combo2.DefaultValue = """task2"""
End If
End Sub
The triplequotes are to set the default value to a quoted string "task2".