LookUp in Advanced Search

i make a table that have values from 1 to 4000 as box numbers and linked that table to the employee table every employee have box number and i make a query view to catch the empty box numbers
example : employee 1 have box 1 , employee 2 have box 2
the query view results will be from 3 to 4000 as empty boxes it work fine in add page when i set new record and get the lookup to the query view but in advanced search in box number it didnt catch the non empty boxes ?

Maybe you need to set the search condition for the said field.

Lookup fields use the same SQL in the Add page and Advanced Search. How did you make your “query view”? Is it a database view? What is the SQL of the tables and the view?