IDs assigned

  • Thread starter Thread starter Sammy
  • Start date Start date
S

Sammy

Can someone please assist me with how I might accomplish
the following:

A) Company_ID is my Primary Key (Text data type)& I
want "C001" assigned to 'Company A' as its ID when entered
into appropriate field. When 'Company B' is entered, I'd
like to have its ID become "C002", etc. How do I
accomplish this?

B) If 'Company A' is entered later, a new ID will NOT be
assigned to it but assigned to the existing ID.

And finally,
C) If 'Company A' has already been entered, along with its
geographical info (address, city, etc.), is it possible to
have that info routinely input this data?

Any help offered is GREATLY appreciated! Thanks a million!
 
Can someone please assist me with how I might accomplish
the following:

A) Company_ID is my Primary Key (Text data type)& I
want "C001" assigned to 'Company A' as its ID when entered
into appropriate field. When 'Company B' is entered, I'd
like to have its ID become "C002", etc. How do I
accomplish this?

B) If 'Company A' is entered later, a new ID will NOT be
assigned to it but assigned to the existing ID.

And finally,
C) If 'Company A' has already been entered, along with its
geographical info (address, city, etc.), is it possible to
have that info routinely input this data?

Any help offered is GREATLY appreciated! Thanks a million!

Will the first letter of this code always be C? If so, don't waste
space storing it; it's easier to do the incrementing if you use an
Integer field. You can format it

"C000"

to display the C.

I'm not sure what you mean by "if Company A is entered later". The
Company table should contain ONLY one record for each company; it
sounds like you're planning to store (if not to enter) the company
information repeatedly. DON'T! You may want to have a Companies table
(with one record per company) related one-to-many to some other table,
which would contain only the CompanyID field. A Query joining the two
tables can bring in the company name, address, etc.
 
Back
Top