Add a custom textbox search With my query

Hello!
I wanna know how can i create a textbox search in Module Products where i can search products by Accounts
As i happen to need a relation between products and accounts where the cost is diferent from account to account i’ ve already created a table relating both tables now all i’m missing is how can i place a customize query in the new search textbox in the Products Module
Thanks in advance