Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
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 November 12th, 2007, 04:03 PM
Registered User
 
Join Date: Nov 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default allow duplicate values in index key

I have an inventory written in access w/macros, I am just learning access myself and bought vba access 2007 by mistake. This program was written previous to 2007 and i am don't know how to access the tables let alone change the index key. can anyone help me please?

 
Old November 12th, 2007, 04:32 PM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 217
Thanks: 0
Thanked 1 Time in 1 Post
Default

Welcome to the Forum, Paul,

What version of Access is your inventory written in?


 
Old November 12th, 2007, 06:44 PM
Registered User
 
Join Date: Nov 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i think it was done in access xp but it could be earlier.

 
Old November 12th, 2007, 07:41 PM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 217
Thanks: 0
Thanked 1 Time in 1 Post
Default

When you say "index key" I am assuming you want to add a new field and make it the primary key. To do so, open the database window, click on "tables" (on the left of the window) and select the table. Open the table in design view. Add a new field, click the "key" icon while you have the cursor on the field you want to become the new primary key. Then to remove the previous primary key (if there was one) select the field, again click on the "key" icon. That should make that field a regular field. (If I understood what you want, are you certain you really you want to change the primary key? You could be headed to trouble.)

If you only want to remove an index from a field, open the table in design view, select the field, in the bottom of your screen you will see properties for the field. Select "Index" and choose what type of index you want (or none.)

HTH,

Loralee








Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple-key index umeshtheone Pro VB 6 3 October 30th, 2007 07:50 AM
Inserting duplicate values in primary key column, Shuchik SQL Server ASP 1 August 31st, 2007 05:38 AM
using 3 XPaths to index using xsl:key Chamkaur XSLT 3 March 2nd, 2007 04:09 AM
Duplicate Primary Key donevco Access 7 January 18th, 2007 01:59 PM
Checking for duplicate primary key in Access Indo77 ASP.NET 2.0 Basics 2 November 29th, 2006 12:19 PM





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