instead of code, can you not just right click and select EQUALS 'name'?
no coding needed.
you can make a text box in the header and type in the name then pressing enter will filter.
your above code works ONLY if supplier code is numeric.
if supplier code is string, you must have quotes around it....
me.filter = "[supplier_code]='" & [supplier_code] & "'"
Code:
sub txtFilter_afterupdate()
if IsNull(txtFilter) then
me.filterOn = false
else
me.filter = "[supplier_code]=" & [supplier_code]
me.filterOn = true
endif
end sub