Access -- Creating a formula or expression for auto numbering

M

MWS-Arkansas

I created a new table by importing from Excel. I choose my on primary key by
selecting the field that holds Patron ID numbers. I need to know how I can
generate a new ID number based on the already exiting ID numbers that came in
from Excel. At this moment, Access will not automatically give me the next
number in sequence. What do I do? HELP!!!
 
J

James Hahn

What do you mean 'based on'? If you want new numbers to be automatically
calculated as the last number used plus 1 (for instance) then you need to
maintain a data record somewhere that contains the last used number. When
you add a new record, access the stored last used number, add 1 to it and
store it back.

There's no feature in Access that does this automatically.
 
J

Jamie Collins

MWS-Arkansas said:
I created a new table by importing from Excel. I choose my on primary key by
selecting the field that holds Patron ID numbers. I need to know how I can
generate a new ID number based on the already exiting ID numbers that came in
from Excel.

If you want to do this properly, see the following KB article:

How To Implement Multiuser Custom Counters in Jet 4.0 and ADO 2.1
http://support.microsoft.com/default.aspx?scid=kb;en-us;240317

Jamie.

--
 

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