I have created an application calling for the entry in one Combo Box (Customer) which then populates the dropdown list of a second Combo Box (Structure).The code seems to work except when I try to change my selection from the first item in the Structure field. Clicking on the down arrow to enter another item does not work. If I manually try keying in the second item in the list, on leaving the field, the it replaces my entry with the first item. The SQL query in the Row source for the Structure field is;
SELECT Structure.Customer, Structure.Structure FROM Structure WHERE (((Structure.Customer)=Forms!Quote!ComboCustomer)) ORDER BY Structure.Structure;
The code behind the Customer field and Form is;
Private Sub ComboCustomer_AfterUpdate()
Me.ComboStructure = Null
Me.ComboStructure.Requery
Me.ComboStructure = Me.ComboStructure.ItemData(0)
End Sub
Private Sub Form_Current()
Me.ComboStructure.Requery
End Sub
Would appreciate any suggestions on fixing this problem.
SELECT Structure.Customer, Structure.Structure FROM Structure WHERE (((Structure.Customer)=Forms!Quote!ComboCustomer)) ORDER BY Structure.Structure;
The code behind the Customer field and Form is;
Private Sub ComboCustomer_AfterUpdate()
Me.ComboStructure = Null
Me.ComboStructure.Requery
Me.ComboStructure = Me.ComboStructure.ItemData(0)
End Sub
Private Sub Form_Current()
Me.ComboStructure.Requery
End Sub
Would appreciate any suggestions on fixing this problem.