Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 26th, 2006, 06:12 AM
Authorized User
 
Join Date: May 2006
Location: delhi, delhi, India.
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Autonumber problem

sir,
i have a field namly Diary_number it is autonumber. Autonumber field always starts from 1 but i want it to start from 1401, is it possible, if possible then please help me and tell me how.

 
Old August 26th, 2006, 09:38 AM
Friend of Wrox
 
Join Date: Oct 2004
Location: Clinton, UT, USA.
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
Default

There may be a better way of doing this, but what I do is....

Setup another table with the same fields, except set the autonumber field as a number.
Enter a single record in that table with 1400 in the field that used to be the autonumber.
Next to an Append query to insert the row into your original table.
Now the next row should be 1401, and you can go ahead and delete the first row.

Hope that helps,

Mike

Mike
EchoVue.com
 
Old August 26th, 2006, 10:46 PM
Authorized User
 
Join Date: May 2006
Location: delhi, delhi, India.
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

sir,
thank you very much for replying my query. but sir it doesn't work. have you sir any other option it any please send me the option so that i can solve my problem
thanking you
harish mankoti

 
Old August 26th, 2006, 10:55 PM
Friend of Wrox
 
Join Date: Oct 2004
Location: Clinton, UT, USA.
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
Default

It should work... At which point did it not work? Perhaps I skipped a step of something?



Mike
EchoVue.com
 
Old August 27th, 2006, 07:55 AM
Authorized User
 
Join Date: May 2006
Location: delhi, delhi, India.
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

[quote]Originally posted by mankoti_mankoti2000
 sir,
i have a field namly Diary_number it is autonumber. Autonumber field always starts from 1 but i want it to start from 1401, is it possible, if possible then please help me and tell me how.


[/
respect echovuo Sir,
thank you very much for giving me right inforamtion and right time but i could not understand right time now i have solved my problem with the help of you, with you help it was not possible to me]

 
Old August 28th, 2006, 10:09 AM
Friend of Wrox
Points: 4,007, Level: 26
Points: 4,007, Level: 26 Points: 4,007, Level: 26 Points: 4,007, Level: 26
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Lansing, Michigan, USA.
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

Hello. I think you misunderstand the use of autonumbers. They are not meant to hold any meaning at all. Therefore, it does not matter what number they start with. Their only function is to relate data from one table to another via a unique identifier. Users never see this number.

If you need a number to make sense, then make Diary_Number NOT an autonumber. Make it a number of type Long and set it yourself via VBA code during run time or have someone be able to assign it via a form textbox.


Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
 
Old August 29th, 2006, 12:28 AM
Authorized User
 
Join Date: Jul 2006
Location: Bloemfontein, Freestate, South Africa.
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi mankoti_mankoti2000

Try this link http://www.techonthenet.com/access/m...ential_nbr.php
I think this will solve your problem.

Cheers,
Hennie






Similar Threads
Thread Thread Starter Forum Replies Last Post
problem Int to Autonumber Irfan_Lateef SQL Server 2000 2 July 9th, 2007 10:57 PM
autonumber problem in Access Pat Crotty Access VBA 2 September 6th, 2006 10:37 AM
AutoNumber causes problem. myself Classic ASP Professional 1 July 10th, 2006 03:35 PM
problem inserting a record with autonumber phytos VS.NET 2002/2003 2 January 16th, 2006 07:14 PM
regarding Autonumber... MuthuAL Classic ASP Databases 2 December 8th, 2004 08:04 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.