hi,
I am using this vba in my combo box in subform, but when i go to next record and select another "productnr" that is defferent then then the above selected in the above record "productnr" disappear
Private Sub productid_Change()
Dim strSQL As String
If Len(Me.productid.Text) > 0 Then
strSQL = "SELECT product.id, product.productnr, product.cod FROM product WHERE (((product.productnr,) Like '*" & Me.productid.Text & "*')) ORDER BY product.productnr,;"
Else
strSQL = "SELECT product.id, product.productnr, product.cod FROM product ORDER BY product.productnr; " 'This is the default row source of combo box
End If
Me.productid.RowSource = strSQL
Me.productid.Dropdown
End Sub