Filtered dropdown

Filtered dropdown

I am creating an app with the form name Salesman Data .
Now in this i have different fields .
One of them is Salesman name and other is salesman id ,etc .
the salesman name is looked up by new form !!!if salesman name is not found !!! it can be add !!! 
now what i want to do is when someone want to add salesman id !!! it should be auto generated and the same id be used the next time the some user use tat salesman id.

Please help me asap