E
Evan
I have read all the posts and links on this. I've seen 2 ways to make Combo2
contingent on Combo1:
1. Add this sql code to Combo2 property's Row Source:
SELECT DISTINCTROW [Table7].[zip] FROM Table7 WHERE ((([Table7].[city]) Like
[forms]![frmSimple]![combo0]));
and add the code:
Private Sub Combo1_AfterUpdate()
Me!Combo2 = Null
Me!Combo2.Requery
End Sub
2. Add code in the AfterUpdate event of cbxCombo1 that assigns the proper
RowSource to cbxCombo2:
Private Sub cbxCombo1_AfterUpdate()
Dim strSQL As String
strSQL = "Select " & Me!cbxCombo1
strSQL = strSQL & " from Categories"
Me!cbxCombo2.RowSourceType = "Table/Query"
Me!cbxCombo2.RowSource = strSQL
End Sub
and add the code:
Private Sub Combo1_AfterUpdate()
Me!Combo2 = Null
Me!Combo2.Requery
End Sub
My question: is one better than the other?
Evan
contingent on Combo1:
1. Add this sql code to Combo2 property's Row Source:
SELECT DISTINCTROW [Table7].[zip] FROM Table7 WHERE ((([Table7].[city]) Like
[forms]![frmSimple]![combo0]));
and add the code:
Private Sub Combo1_AfterUpdate()
Me!Combo2 = Null
Me!Combo2.Requery
End Sub
2. Add code in the AfterUpdate event of cbxCombo1 that assigns the proper
RowSource to cbxCombo2:
Private Sub cbxCombo1_AfterUpdate()
Dim strSQL As String
strSQL = "Select " & Me!cbxCombo1
strSQL = strSQL & " from Categories"
Me!cbxCombo2.RowSourceType = "Table/Query"
Me!cbxCombo2.RowSource = strSQL
End Sub
and add the code:
Private Sub Combo1_AfterUpdate()
Me!Combo2 = Null
Me!Combo2.Requery
End Sub
My question: is one better than the other?
Evan