Positive Record ID for tracking changes

X

XP

Using Office 2003 and Windows XP;

I need to create a numeric record ID that stays with each record forever.
This might be like an autonumber (and perhaps assigned by one? - but how do
you increment it and get the next one programmatically?) but hard coded so
that as changes are made they may be tracked and tied to the original record
(which is archived in its original state).

The Record ID may begin at one and contain as many digits as necessary and
these would be applied to a certain set of records used to initially load the
DB.

But, in some cases the user's may add a new record in which case a new
Record ID must be assigned to the new item. In that case, the program would
need to obtain the next available number in the sequence.

Can some of you out there lend me your suggestions on how to approach this
issue and perhaps even post a possible VBA solution?

Thanks much for your assistance.
 
K

Klatuu

Just make the field an AutoNumber. It will handle all that for you.
However, it is not a good practice to try to use that number for anything
other than relating tables or searching for a specific record. And, you
cannot expect that the sequence of numbers will not have gaps. If a user
creates a new record and cancels that record (undo) before it is inserted in
the underlying table, the number assigned to that record is lost.
 
K

Keith Wilby

XP said:
Using Office 2003 and Windows XP;

I need to create a numeric record ID that stays with each record forever.

Use AutoNumber, no code required.

Keith.
 

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