Results 1 to 4 of 4
  1. #1
    Persist is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Jul 2010
    Location
    Melbourne Australia
    Posts
    32

    Access stops me from increasing the size of a key field

    Access stops me from increasing the size of a key field



    Table tTrades
    . Key field: idTrade: auto-number
    . Field: Code: Text 10 characters

    Table tData
    . Key field: Code: Text 10 characters

    I get an error message when I try to change either of these Code fields from size 10 to 16 characters

    Error message “you cannot change the data type of field size. It is part of one or more relationships. Te change the data type of this field, first delete its relationships in the relationships window.

    I deleted all relationships in the relationships window
    But I still get the same error message.

    If I click on relationship window > "All realtionships", Access reproduces all my relationships in the relationship window. Somehow it knows them. I deleted them all again and saved.
    But I still get the same error message.

    I have a form ftTrades which generates automatically when I click on table tTrade and create a form
    I deleted this form ftTrades
    But I still get the same error message.

    Any ideas on how I can increase the size of this field

  2. #2
    tanvi is offline Competent Performer
    Windows XP Access 2010 32bit
    Join Date
    Mar 2012
    Posts
    100
    Hello Persist,

    It looks like you have missed some relationships. Verify that you have selected all the relationships for delete. Click on the 'Show All' button to verify.
    If it is a split database then deleting relationships in the front-end does not reflect on the actual relationships, so you need to delete it in the back-end also.

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,643
    I made a copy of my db. Removed all reports, forms, queries, relationships, deleted records, removed lookups from table, ran compact and repair - still get this message. So the issue is not really relationships - MS is known to give messages that are not accurate for an issue.

    In one table I remove the PK designation but still could not change the field size. In another table would not let me remove the PK designation.

    I tried importing tables to a new db, same issue.

    Apparently, changing properties of a PK field is not easy.

    Went back to original db. Made copy of table. Fixed the PK field in copy. Deleted the original table. Renamed copy. Everything works.
    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.

  4. #4
    Persist is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Jul 2010
    Location
    Melbourne Australia
    Posts
    32
    I copied the whole database Mydb01 to Mtdb02 first
    So far I have not needed this backup

    Copied tData to tData02
    Changed the length of PK Code in tData02

    Copied table tTrades to tTrades02
    Changed the length of Code in tTrades02

    Renamed tData02 to tData
    Access warned me that all relationships would be deleted
    I said to do it
    I got a fright.
    All the queries and forms shown under tData were no longer under tData
    They were there but not under tData
    I opened each one in design and saved it. It moved itself to under tData.

    Same happened for tTrades02

    I think I have made the change I wanted
    Thanks

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

Similar Threads

  1. Replies: 4
    Last Post: 05-08-2013, 11:56 AM
  2. Replies: 2
    Last Post: 03-20-2013, 04:25 PM
  3. Replies: 3
    Last Post: 07-19-2012, 09:27 AM
  4. .GoTo and .TypeText - Stops When Field is Empty
    By alpinegroove in forum Programming
    Replies: 5
    Last Post: 01-04-2012, 10:16 AM
  5. Increasing values
    By Underworld in forum Access
    Replies: 4
    Last Post: 02-24-2010, 03:21 AM

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