Results 1 to 3 of 3
  1. #1
    stevepcne is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2011
    Location
    Boston, Ma.
    Posts
    23

    primary key: changing of ramifs

    Hi,




    Q. Can i change the primary key currently set to my products description to an auto number? I'm trying to make things right, also does the foreign key get an auto number? Thanks in advance...

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,602
    You can change but is a complex, tedious, and risky process if you already have data. The foreign key would be number datatype.

    If you already have data, create the new fields, set properties. UPDATE the new foreign key field to the new Autonumber values. Change relationships. Will have to modify any established queries and form/report RecordSource statements. Delete old fields after sure edits went okay.
    Last edited by June7; 11-19-2011 at 09:32 PM.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    stevepcne is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2011
    Location
    Boston, Ma.
    Posts
    23
    Thanks for the reply June7, You Rock!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Primary Key
    By DukeBlue in forum Access
    Replies: 18
    Last Post: 09-23-2011, 05:23 PM
  2. alphanumeric primary key
    By slimjen in forum Database Design
    Replies: 4
    Last Post: 09-18-2011, 10:20 PM
  3. Primary Key Issue
    By Ciwan in forum Access
    Replies: 5
    Last Post: 10-23-2009, 10:04 PM
  4. Primary Key Help
    By phoenix13 in forum Access
    Replies: 4
    Last Post: 07-30-2009, 12:36 PM
  5. about the primary key!
    By Yuesko in forum Access
    Replies: 1
    Last Post: 05-29-2009, 04:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums