I am currently working on a Stock Control database and I am trying to set a filter on the form using a combo box.
At present I am using a continuous form with the combo box being placed in the header so that it is always viewable.
I have put the code in to the form however every time i select anything in the combo box I get an error message saying:
run-time error '2501':The combo box name is: cmbProductSearch
The ApplYFilter action was canceled
The code that I have in place is:
Expand|Select|Wrap|Line Numbers
- 'filter that is used to filter the records based on product name
- Private Sub cmbProductSearch_Change()
- currentFilter = "((((tblProducts.ProductDescription) = " + "'" + cmbProductSearch + "')))"
- Filter = currentFilter
- DoCmd.ApplyFilter , Filter
- End Sub
I have used Windows XP Home and Windows XP Professional
I would really appreciate any help on this as I seem to have hit a very large brick wall as I have now tried many different things that I have found on the web.
Best Regards,
Ben