Can anybody help me with a filtering issue?
I have a bound form, in its heading I have a combo box which lists three choices. Basically I want to filter all my purchase records by checking a field PUOrderNb (Example: PO200100025) against the choice made in the combo box, namely DE (for demand), PO (for Purchase order) etc.
On the after update event of the combo box, I have the following code:
Dim strfilter As String
strfilter = " left ([PuOrderNb],2) like " & cboFilter.Column(1)
Me.Filter = strfilter
Me.FilterOn = True
When I make a choice in the combo box, I get a window asking me to enter a parameter value and it lists the value of the combo box choice as a sort of a title just above the white input fame.
When I type in PO for instance, the program does correctly filter all order numbers starting with PO, but the whole point of having a combo box is not to have to type anything.
The other odd thing is, when I change the choice in the combo box, after my first choice, I do not get this parameter question but nothing happens as to filtering. The first choice remains active.
Thanks for your help.
I have a bound form, in its heading I have a combo box which lists three choices. Basically I want to filter all my purchase records by checking a field PUOrderNb (Example: PO200100025) against the choice made in the combo box, namely DE (for demand), PO (for Purchase order) etc.
On the after update event of the combo box, I have the following code:
Dim strfilter As String
strfilter = " left ([PuOrderNb],2) like " & cboFilter.Column(1)
Me.Filter = strfilter
Me.FilterOn = True
When I make a choice in the combo box, I get a window asking me to enter a parameter value and it lists the value of the combo box choice as a sort of a title just above the white input fame.
When I type in PO for instance, the program does correctly filter all order numbers starting with PO, but the whole point of having a combo box is not to have to type anything.
The other odd thing is, when I change the choice in the combo box, after my first choice, I do not get this parameter question but nothing happens as to filtering. The first choice remains active.
Thanks for your help.