August 28, 200619 yr I've got a company details table / database with each company having a unique company code. At the moment the field is set so that it auto enters a serial number with a increment of 1 each time but what i really want is to generate a unique company code based on the name of the company. for example a company called microsoft would have a code of MIC01 and if you added a company called microwidget that would be called MIC02. Does that make sense? Basically I want to take the first 3 letters of the company name and a number (or whatever the best way is to do this) Thanks
August 28, 200619 yr Set up a calculated field. Calculation: Left (CompanyDB::CompanyName ;3) & CompanyDB::CompanyID It grabs the first 3 letters of the company name plus the CompanyID. HTH
Create an account or sign in to comment