Wrox Programmer Forums
|
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 October 4th, 2004, 01:47 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 331
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to qazi_nomi
Default Auto Complete Feild

I have a database in Access and in its tables the primary key is auto complete. But the problem is that when I delete one feild say its id is 2 then when add new record it generate 3 for its id feild. I want this that when a record is deleted it Id will assign to very next record which will be inserted after the deletion
Please tel me how can I do this ?
 Thanks in advance.


(*_*)

Numan
--------------------------------------------------
It is not important what you get But important is how you got it
__________________
(*_*)

Numan
--------------------------------------------------
It is not important what you get But important is  how you got it
 
Old October 4th, 2004, 09:11 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 625
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jemacc
Default

Be very careful using the method you mention and what you are trying to accomplish. In a multi-user environment as you can have two users getting the same number. If your application is multi-user then you need to create a separate table to store
the current maximum number. If the auto number is just serving as counter, reseed it.


Jaime E. Maccou
Applications Analyst
mailto:[email protected]

"Our lives begin to end the day we become silent about things that matter."

- Dr. Martin Luther King, Jr.

"The mind does not take its complexion from the skin..."

- Frederick Douglass

There is always a way to do it better . . . find it!" Thomas A. Edison





Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto Complete Problem - not working sometimes mmcdonal Access VBA 1 December 19th, 2006 02:35 PM
Data access page help. passing feild values [email protected] Access 0 November 26th, 2006 05:29 PM
How to output part of feild using mysql method MySQL 1 March 6th, 2006 05:48 PM
Auto Complete sridevi HTML Code Clinic 4 June 28th, 2004 06:45 AM
How to increase the size of a text feild qazi_nomi Access 1 June 15th, 2004 03:30 AM





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