catboy Posted August 28, 2006 Posted August 28, 2006 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
aldipalo Posted August 28, 2006 Posted August 28, 2006 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
Recommended Posts
This topic is 6724 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now