Hello all,
I've got a form with an unbound textbox where I can enter a 7 digit shipment ID, for example 1175080
On the same form, I've got a listbox, which I want to display the values from a table, but filtered on "Like textbox"
What I have created is an on change event for my textbox
However, the listbox stays empty. I think that it has to do something with the Row Souce and Row Souce Type properties from the listbox, but I don't know what.
Can someone help me? I can't figure out what I'm doing wrong here.
I've got a form with an unbound textbox where I can enter a 7 digit shipment ID, for example 1175080
On the same form, I've got a listbox, which I want to display the values from a table, but filtered on "Like textbox"
What I have created is an on change event for my textbox
Code:
Private Sub ShipmentNumberFRM_AfterUpdate()
Me.ReasonCodeTBL.RowSource = "SELECT TBL_Master_Reason_Code_Per_Shipment.*
FROM TBL_Master_Reason_Code_Per_Shipment" _
& "WHERE (((TBL_Master_Reason_Code_Per_Shipment.[Shipment Number]) Like " & Me.ShipmentNumberFRM.Text & "));"
End Sub
However, the listbox stays empty. I think that it has to do something with the Row Souce and Row Souce Type properties from the listbox, but I don't know what.
Can someone help me? I can't figure out what I'm doing wrong here.