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 June 27th, 2003, 12:17 PM
Registered User
 
Join Date: Jun 2003
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default Autonumber Primary Key

I am using Access as a front end to my MS SQL Server 2000 database. I would like to be able to have the Primary Key be an autonumber feild, but there does not seem to be an option for that. Any suggestions would be helpfull.

Thanks,
Jon
 
Old June 27th, 2003, 10:59 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
Default

Jon,

Set the column data type to 'int', and the identity property
(on the Column tab) to 'yes'. The identity seed and identity increment
properties will automatically be set to 1. Emulates an autonumber.

Sorry if this is a duplicate.

hth
Bob





Similar Threads
Thread Thread Starter Forum Replies Last Post
Foreign key not updating with Primary key xavier1945 BOOK: Access 2003 VBA Programmer's Reference 2 July 4th, 2007 09:48 PM
recovering an autonumber primary key Loralee Access 10 October 2nd, 2005 12:54 AM
FOREIGN KEY and PRIMARY KEY Constraints junemo Oracle 10 June 15th, 2004 01:00 AM





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