Adjust Quantity in lookup record based on quantity selected in parent record

Adjust Quantity in lookup record based on quantity selected in parent record

I would like to adjust the inventory quantity of a product based on the quantity selected in the parent Order form. is this possible? If so please explain with example code or concept.

Thank you!