Insert New Records While Changing Status

My tables CustTable and MCRHoldCodeTrans .

NEW SALES ORDERS :

Add functionality so that any new Sales Orders inherit the hrk_CreditStatus from the CustTable.

If the Customer has a credit status of ‘Always Hold’, create a record in MCRHoldCodeTrans with the Hold Code ‘Always Hold’ for the new Sales Order.

If the Customer has a credit status of ‘Over Credit Limit’, create a record in MCRHoldCodeTrans with the Hold Code ‘OverCreditLimit’ for the new Sales Order.

If the Customer has a credit status of ‘Past Due’, create a record in MCRHoldCodeTrans with the Hold Code ‘Past Due’ for the new Sales Order.

If the Customer has a credit status of ‘Prepayment’

Set SalesTable.Payment = ‘Prepayment’

Create a record in MCRHoldCodeTrans with the Hold Code ‘Prepay’ for the new Sales Order.

Tell me how to do this ,

Sarath

Which part are you struggling with?

I have to write coding in Custtable form in the place of hrk_creditstatus control.
It is a combo box with above mentioned values .The new row should be inserted to MCRHoldCodeTrans Table based on my selection .