Im having trouble filtering a combobox on a form. I have two Comboboxes, one is called (FleaTickWorming) depending on what is elected in this cobo, will deside on what is available in the other combo which is called (Product). The form is a continuous form. The filtering works, in as far as it changes the list each time, but it also deletes the item that I have chosen on previous records if the list is different. Hope I have explained this so that you understand!
My code is as follows:
My code is as follows:
Code:
Private Sub FleaTickWorming_BeforeUpdate(Cancel As Integer)
If Me.FleaTickWorming.Column(0) = 1 Then
Me.Product.RowSource = "qry_FleaProducts"
ElseIf Me.FleaTickWorming.Column(0) = 2 Then
Me.Product.RowSource = "qry_TickProducts"
ElseIf Me.FleaTickWorming.Column(0) = 3 Then
Me.Product.RowSource = "qry_FleaTickProducts"
ElseIf Me.FleaTickWorming.Column(0) = 4 Then
Me.Product.RowSource = "qry_WormingProducts"
End If
End Sub