Go to: System - Accounting System Info


Select the company file you would like to link to and Click "Edit" 


Click on the "Cost Codes" tab


Select the Cost Code by highlighting it and click "Edit" (if you are creating an new code to link click "New")


Select the code you would like to link to from the "Linked to" drop down list and click "Update"