I have a split form bound to a table with a control button that will filter the table.
below is the macro builder code attached to the click event of the button.
If DCount("PLU","[tbl_Item]",[PLU] Like "*" & [Forms]![Item_Master]![SearchField] & "*")=0
Message: Item does not exist
Where [PLU] Like "*" & [Forms]![Item_Master]![SearchField] & "*"
The issue is:
the form defaults to the first record of the table and then the filter will just looks at the first record and not the entire table. If the "*new record" row on the bottom of the split form is selected every time the filter is run (manual mouse click) then the filter will work.
I tried to add the code: GoToRecord new at the top of the macro. After I did this, the filter works if I enter a value in the search box that exists in the table. However, if a unmatched value is entered in the search box the message box function does not work: the filter will select the "*new record" bottom row, and display 1 of 1 records filtered.