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 » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Set auto#



 
 
Thread Tools Display Modes
  #1  
Old December 28th, 2009, 09:03 PM posted to microsoft.public.access.tablesdbdesign
szag via AccessMonster.com
external usenet poster
 
Posts: 99
Default Set auto#

I have a historical table with a JOB#'s field in it. the numbers for this
field were entered somewhat randomly and go up to about the number 7700. I
would like to set this JOB# field to start at 8000 for all new jobs going
forward then just go up by one for each newly assigned JOB#.

--
Message posted via http://www.accessmonster.com

  #2  
Old December 28th, 2009, 09:27 PM posted to microsoft.public.access.tablesdbdesign
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Set auto#

If the field is defined as an Access Autonumber, congratulations! You've
(re-)discovered one of the reasons why the Access Autonumber is unfit for
human consumption.

The Access Autonumber data type works great for what it is designed to do,
that is, to provide a unique row identifier.

If you expect it to be sequential without gaps, or plan to be setting the
value, you need to use a different data type -- those are NOT what
Autonumber is designed to do.

Try searching on "custom autonumber" for approaches to creating your own
sequential numbering procedure.

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.

"szag via AccessMonster.com" u2885@uwe wrote in message
news:a147b6afbb87d@uwe...
I have a historical table with a JOB#'s field in it. the numbers for this
field were entered somewhat randomly and go up to about the number 7700. I
would like to set this JOB# field to start at 8000 for all new jobs going
forward then just go up by one for each newly assigned JOB#.

--
Message posted via http://www.accessmonster.com



  #3  
Old December 28th, 2009, 11:08 PM posted to microsoft.public.access.tablesdbdesign
Clifford Bass via AccessMonster.com
external usenet poster
 
Posts: 150
Default Set auto#

Hi,

Take a look at http://support.microsoft.com/kb/812718.

Clifford Bass

szag wrote:
I have a historical table with a JOB#'s field in it. the numbers for this
field were entered somewhat randomly and go up to about the number 7700. I
would like to set this JOB# field to start at 8000 for all new jobs going
forward then just go up by one for each newly assigned JOB#.


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...esign/200912/1

  #4  
Old December 30th, 2009, 01:28 PM posted to microsoft.public.access.tablesdbdesign
BruceM via AccessMonster.com
external usenet poster
 
Posts: 448
Default Set auto#

Here is one way of creating a custom "autonumber" that increments by 1 with
no gaps:

http://www.rogersaccesslibrary.com/f...ts.asp?TID=395

Note the multi-user example, if there could be more than one user at a time.

To start at 8000 the simplest would be to create a record with 8000 as the
job number, then lock the text box. Or you could create a dummy record (or
renumber an old record) with the number 7999.

szag wrote:
I have a historical table with a JOB#'s field in it. the numbers for this
field were entered somewhat randomly and go up to about the number 7700. I
would like to set this JOB# field to start at 8000 for all new jobs going
forward then just go up by one for each newly assigned JOB#.


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...esign/200912/1

 




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 01:19 AM.


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