You'll need a table with account name and code. That might be a table that you already have given that you are entering account names and codes into fields of a table. But a table of account names and associated codes with one record per account name would make it easier for you to manage account names and codes.
A relationship can match records by the account name field and a looked up value field option can then copy over the account number from the matching related record.
You might be interested in a value list demonstrated in:
"Adventures in FileMaking #2 - Enhanced Value Selection"
This is an auto-complete enabled drop down list of names that uses a relationship to look up the associated ID with a script step up to handle duplicate names and names that do not exist in the table from which the ID is looked up.
thx PhilModJunk, may I know where can I find details of
thx for your help, but so unlucky that i am using filemaker pro 11... i can't open the file after downloading it...