Fetch data from another table into a form field

Fetch data from another table into a form field

I have spent the day trying to work this out so i thought i would use the forum for the first time.

I have two forms in the same application and when a user selects a customer name from a drop down field and would like the customer number field in the same form to auto populate by finding the customer number in another table.

So the form to populate is (pms_order) the dropdown lookup field is (Customer Name) and the field to populate is called (customer number)

the table to fetch the data from is called (pms_customers) and the matching field is called (customer name) and the field to fetch the date from is called (customer number)

any advice is appreciated

    Nederlandse Hulpbronnen