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 August 23rd, 2005, 12:36 PM
Authorized User
 
Join Date: Aug 2005
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default Populate Auto-Number Field

I have an Autonumber primary key for each table in my Access 2003 database. I have these fields locked, but visible in each respective form. The problem is that when I go to add a new record on any of these forms, this field is displayed as "(AutoNumber)". Is there any way for this to populate and display the next number, without requiring me to change another field first?

http://img277.imageshack.us/img277/1...onumber6th.jpg

Thanks for the help!

 
Old August 23rd, 2005, 03:35 PM
Friend of Wrox
 
Join Date: Jun 2003
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

I don't think this is possible, nor is it desirable. Autonumber primary keys should never be seen nor used by users. They're there only to relate data in related tables, silently in the background. If you want people to see some kind of ID to go with a record, make one up that makes sense to the user; but keep the autonumber primary key hidden.

Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
 
Old August 26th, 2005, 06:49 AM
Registered User
 
Join Date: Aug 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to MrSpock2005
Default

About the only two things I use the autonumber for is first to give a unique number to all records for joining databases. I also use it for easy fast access to records that I want to make updates to. On my input form I can enter the autonumber (which I print on all phone center reports) so I can update information quickly. In the call center we have to check 3 things, did we get a survey, was the survey denied (ie person called said pack sand), and to mark a number as no good. In the last two cases it tells the computer to drop the phone number from the Table to we don't waste our time calling someone over and over. When we get a good survey, that is also auto updated with a check box field so we know to add that survey to the main system, and use the data for statistical reports for the companies we do surveys for. Also if we do nothing with the call, ie busy signal, no answer, etc then the computer will periodically try the number again. But to answer your question, I would not want to use autonumber in that way. Anytime autonumber is used, it waits till the record is saved to fill the box, because otherwise you would end up with hundreds of autonumbers in empty records. Hope this helps. (Signed Old Stone Face)

Robert Taylor





Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto populate/look up slim Access 6 May 31st, 2007 03:58 AM
GridView auto populate stonesbg ASP.NET 1.0 and 1.1 Basics 0 February 19th, 2007 10:41 AM
How can I auto-populate two MS Word document field kenn_rosie ASP.NET 1.0 and 1.1 Basics 0 February 15th, 2006 03:59 AM
Sequential numbering a non auto number field dbartelt Access 3 May 5th, 2005 02:56 PM
Auto Populate a field ? mar0364 Classic ASP Databases 4 July 9th, 2004 11:10 AM





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