A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Auto number field



 
 
Thread Tools Display Modes
  #1  
Old May 27th, 2010, 10:23 PM posted to microsoft.public.access
blake7
external usenet poster
 
Posts: 153
Default Auto number field

Hi All, I would like to know if it is possible to renumber an auto number
field, I know this is scoffed upon and goes against the principals of
database management, but i would really like to know if it can be done. I am
currently using data imported from an excel sheet which my company uses for a
tracking system, I intend to start a fresh table when I have finished writing
and testing the database so would like this new table to start at a number
beyond the current excel sheet.

What is the easiest way to start the new table at 20000

Thanks
  #2  
Old May 27th, 2010, 10:28 PM posted to microsoft.public.access
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Auto number field

You've said "how", but not why ...

If you'll describe the business need you are trying to solve, folks here may
be able to offer appropriate suggestions.

.... or maybe you've already decided which approach you are going to use, and
just want someone to tell you which button to push...

Good luck!

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"blake7" wrote in message
...
Hi All, I would like to know if it is possible to renumber an auto number
field, I know this is scoffed upon and goes against the principals of
database management, but i would really like to know if it can be done. I
am
currently using data imported from an excel sheet which my company uses
for a
tracking system, I intend to start a fresh table when I have finished
writing
and testing the database so would like this new table to start at a number
beyond the current excel sheet.

What is the easiest way to start the new table at 20000

Thanks



  #3  
Old May 27th, 2010, 10:43 PM posted to microsoft.public.access
blake7
external usenet poster
 
Posts: 153
Default Auto number field

Hi Wayne, Never thought of that, were do you place the max lookup +1
statement and how is it writen etc
Thanks

"Wayne-I-M" wrote:

This really isn't what autonumbers are for. The only thing they do is to
provide a unique set of data - eg. so you can identify a record, etc.

It is a BIG mistake to use them for anything other than as a unique reference.

I suppose if you really wanted to you could just create a record then copy
it and paste append.
Then copy the 2 records and paste append
then the 4 records etc etc etc until you have 19999 records

but this is just silly

Why not not just add a number field to your table add 19999 into it and then
auto incremet this field (use a max lookup +1). Much better.


--
Wayne
Manchester, England.



"blake7" wrote:

Hi All, I would like to know if it is possible to renumber an auto number
field, I know this is scoffed upon and goes against the principals of
database management, but i would really like to know if it can be done. I am
currently using data imported from an excel sheet which my company uses for a
tracking system, I intend to start a fresh table when I have finished writing
and testing the database so would like this new table to start at a number
beyond the current excel sheet.

What is the easiest way to start the new table at 20000

Thanks

  #4  
Old May 27th, 2010, 11:02 PM posted to microsoft.public.access
Wayne-I-M
external usenet poster
 
Posts: 3,674
Default Auto number field

Hi

There are lot of ways to use it
I don't really understand what you're trying to do but if it were me (I like
to check stuff 1st) I would import all you data into a table then either loop
through the records with a dmax + 1 on your new field (20,000) or you could
use a query to add it to the field in the table.

There are zillions of examples on google (search on "ms access dmax +1"),
just have a look around and see which method suits your needs best.



--
Wayne
Manchester, England.



"blake7" wrote:

Hi Wayne, Never thought of that, were do you place the max lookup +1
statement and how is it writen etc
Thanks

"Wayne-I-M" wrote:

This really isn't what autonumbers are for. The only thing they do is to
provide a unique set of data - eg. so you can identify a record, etc.

It is a BIG mistake to use them for anything other than as a unique reference.

I suppose if you really wanted to you could just create a record then copy
it and paste append.
Then copy the 2 records and paste append
then the 4 records etc etc etc until you have 19999 records

but this is just silly

Why not not just add a number field to your table add 19999 into it and then
auto incremet this field (use a max lookup +1). Much better.


--
Wayne
Manchester, England.



"blake7" wrote:

Hi All, I would like to know if it is possible to renumber an auto number
field, I know this is scoffed upon and goes against the principals of
database management, but i would really like to know if it can be done. I am
currently using data imported from an excel sheet which my company uses for a
tracking system, I intend to start a fresh table when I have finished writing
and testing the database so would like this new table to start at a number
beyond the current excel sheet.

What is the easiest way to start the new table at 20000

Thanks

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:39 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.