Set value bases on check box


I have create one custom check box in purchase recipt throgh the customize form …so i want to set a value when check box is uncheck then in accepted warehouse filed set one warehouse that is test-warehouse …

if box is check then user can select any warehouse in the accepted warehouse filed …
can anyone help me how i do this and where to add the code
need help