Primary key or document number

J

J. Mark

I am trying to create a unique document number for
tracking. The number would be concantenated with Fiscal
year - Location identifier - Sequential number by Location.

My first take was to create it as a primary key but now
think that may not be the best way. Suggestions???

Can you create a primary key on the fly? want more than
the Autonumber for the document number so that a quick
glance at the document number gives me information without
having to cross reference and research.

Thanks for your help.
 
T

TC

You could do this in one of two ways.

(1) Have an autonumber as the primary key (ie. each document has a different
autonumber), and store the fiscal year, location identifier & sequential
number by location as further fields in the record so you can display them
when required; or,

(2) Omit the autonumber, have the afore-mentioned three fields in the record
& define them as the "composite" (multi-field) primary key.

Creating a primary key "on the fly" is absolutely not the right way of
thinking about it.\

Before you proceed, read & digest this article:
http://support.microsoft.com/support/kb/articles/Q100139.ASP

HTH,
TC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top