Microsoft Access Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMicrosoft Access Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old August 3rd, 2005, 09:36 AM
Rishyraj Rishyraj is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 53 Rishyraj User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 29 m
Reputation Power: 5
Question Autoincrement number to be changed

Hi All,

I have an autoincrement number

example 9800001

but the actual number should have been 7800001. Now that the users have used some numbers using series 9800007.
I want going forward the numbers should autoincrement using series 7800008.

Any suggestions would help

Reply With Quote
  #2  
Old August 3rd, 2005, 11:12 AM
lwells lwells is offline
Contributing User
Dev Articles Novice (500 - 999 posts)
 
Join Date: Sep 2004
Posts: 632 lwells User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 21 h 59 m 38 sec
Reputation Power: 5
Well Rishyraj, I hate to be the one to give you some bad news, but you won't be able to do what you want. As you can see 7800008 is less than 9800007 so you can never make the autoincrement start from a number less than the current max number in the table. This is exactly the reason autoincrement should never be used for anything except to index tables by in relationalship databases.

What I would recommend if you can change the table design, is to change the current autoincrement field to a number, add a new field that is autoincrement and make this the primary key field. Then you can make the loan ID number any number you wish. You can then use the DLast function to find the last number in this field and add 1 to it to get the next number in sequence.

lwells

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft Access Development > Autoincrement number to be changed


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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 On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT