Sorry, I should have explained that more.
In the relationship between the two tables, create a new summary field.
it will default to something like [# of Customers] which is fine.
>
On the "Code Name" table, make a new report called "Available Code Names"
Add the 1 or 2 columns that you want to appear for the 'record picker'.
(this is what will show in the dropdown)
>
Add a filter to show the code names where [# of customers] is equal to 0.
(This will exclude any code names that have been used)
>
Go back to your customer table,
>
click "Customize this form"
>
Find the form element for the record
>
Change the dropdown from 'use the standard record picker' to your "Available Code Names" report
= Now you will be able to only select the available codes
#NoCodeRequired