Access numbering help needed!

M

MattW

All,

I am quite new to Access but have used Excel for a number of years
now. Most of the work I've done in Access has been trial-and-error
type of stuff. I've been given a project which requires some Access
work and I've hit a road block on part of my project. Here it goes...

I have a table in Access that is linked through ODBC. I pull the data
from that table to create quite a few different reports - which is
going well. The only thing is I need that table to have a sequential
number for each record. The program that creates the ODBC table can
not be modified to do this for me, so I need to find a way to do it
through Access. Currently, there are 36,000+ records in the database
and more being added daily.

Ideally, I need to assign a sequential number to each record. There
is a column in the table that is currently not being used for anything
that I would like to use for the sequential number.

Initially, I will assign the sequential number to each of the 36,000+
records in the table. The current 36,000+ records will always remain
- they won't change or be deleted. Each week, when I pull the report,
I would need to add continuing sequential numbers to the table, since
new records will have been added the previous week. This would
obviously require Access to search out the last number used each week
and continue adding to it.

It's really not critical that the numbers are sequential - as long as
they are unique for each record. If it's easier to assign the "new"
records a sequential number based on the date (i.e. 082407001,
082407002, etc.) I run the report each week, I'm o.k. with that too.

I'm not too familiar with how the whole ODBC-thing works, so if my
terminology is off on how that links up to the table, etc. I apologize
in advance. I do know that when I go into the Access table and make a
change, it does populate correctly back into the program that is
creating that table through ODBC. I've tested that part of it.

I appreciate any help you can provide me with this challenge!

Matt
 
J

Jeff Boyce

Matt

Microsoft Access offers a "unique identifier" data type called Autonumber.
It isn't guaranteed to be sequential, and is generally unfit for human
consumption. If your 36,000+ records are already related to records in
other tables, are you also figuring to update THOSE records with the new
identifier?

You've described a "how" -- you "need...a sequential number for each
record". Why? What will having a sequential (or even just unique) number
for each record allow you to do?

I'm asking for more context because there may be alternate ways to get what
you actually need (few folks need sequential numbers just to have sequential
numbers).

Regards

Jeff Boyce
Microsoft Office/Access MVP
 

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