2 Autonumber questions

G

Guest

1) I am importing an excel file which contains product information into a
table in Access. I need to include a sequential number beginning with 1 for
the top item, down to the last item. I used Autonumber to generate the
number and it worked fine. When I erased the table and added another set of
data, the autonumber began where the previous number left off, not at 1
again. How can I get autonumber to reset to 1 when I erase the table?

2) This table is going to be exported to a text file. The autonumber needs
to have a format that is 10 digits long beginning with 1. So the first entry
needs to look like 0000000001, the 32nd entry would need to look like
0000000032, the 239th entry would need to look like 0000000239, and so on.
How do I get those zeroes in front of the number?

Thanks.
 
N

Norman Yuan

Do not use AutoNumber if you want "sequential". This has been asked and
answered hundreds or thousands times in this NG. So, search "AutoNumber" in
this NG for detailed explanation.
 
J

Jeff Boyce

Access Autonumbers are unique row identifiers. That's it!

If you need to keep a sequential record number, do a search at Google.com or
mvps.org/access for "Custom Autonumbers".

To format data for output, use a query. In the query, use the Format()
function to get the data looking the way you need.

--
Regards

Jeff Boyce
Microsoft Office/Access MVP


Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/

Microsoft Registered Partner
https://partner.microsoft.com/
 
G

Guest

OK, will do. Thanks.

Norman Yuan said:
Do not use AutoNumber if you want "sequential". This has been asked and
answered hundreds or thousands times in this NG. So, search "AutoNumber" in
this NG for detailed explanation.
 
G

Guest

Thank you.

Jeff Boyce said:
Access Autonumbers are unique row identifiers. That's it!

If you need to keep a sequential record number, do a search at Google.com or
mvps.org/access for "Custom Autonumbers".

To format data for output, use a query. In the query, use the Format()
function to get the data looking the way you need.

--
Regards

Jeff Boyce
Microsoft Office/Access MVP


Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/

Microsoft Registered Partner
https://partner.microsoft.com/
 
D

David F Cox

"Results 1 - 10 of about 24,800 for autonumber problem group:*access* (0.68
seconds) "
 

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

Similar Threads


Top