Results 1 to 6 of 6
  1. #1
    tylerg11 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    200

    Changing Misspelled Record

    I want to change misspelled records, but the misspells are in the primary key of my table. By changing the values of primary key fields, can I break table relatioships? I'm not changing field names, just field values of a primary key field.

  2. #2
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    If your misspelled values have corresponding values in other tables - once you correct the spelling in your Primary key field - those records will no longer be related if the misspellings are in the related tables as well. So - yes - you will be breaking the relationships between records in different tables if they exist.

  3. #3
    tylerg11 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    200
    So what would be the best way of changing a misspell that is a primary key and related to other relatioships as a foreign key?

  4. #4
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    When I have had this happen in the past - it has been a task for the Data Entry people.
    I don't know if there is a way to automate this.
    Are there like . . . thousands of these errors? And will they have to be changed across a Bunch of tables?
    If not - just change them manually.

    If it is a HUGE problem - then it might be worth creating a small form to scroll through each record in the field that has the misspells - and fix the spelling [again manually] . . . on the Form - and then on your Update button on this form - have code to go out to each of the related tables - look for the incorrect spelling - and update it with the changed spelling.
    I hope this helps!

  5. #5
    alansidman's Avatar
    alansidman is offline Indifferent
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,536
    Why would you make your primary key anything other than an autonumber? You will never have this issue if you follow that as a self directed rule. If you need some other identifier then add it as a field but for primary keys which is how Access links tables, I believe that autonumber is the best practice. I would change the design before I got to far down the road. It will save a lot of aggravation.

  6. #6
    tylerg11 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    200
    Quote Originally Posted by Robeen View Post
    When I have had this happen in the past - it has been a task for the Data Entry people.
    I don't know if there is a way to automate this.
    Are there like . . . thousands of these errors? And will they have to be changed across a Bunch of tables?
    If not - just change them manually.

    If it is a HUGE problem - then it might be worth creating a small form to scroll through each record in the field that has the misspells - and fix the spelling [again manually] . . . on the Form - and then on your Update button on this form - have code to go out to each of the related tables - look for the incorrect spelling - and update it with the changed spelling.
    I hope this helps!
    It is just about 8 records. I want to change "Gyros Whdg" to "Gyros WHDG". But when I change these mispells in these field, since this field is part of the primary key, I don't want the spell change to disconnect relationships.

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

Similar Threads

  1. Replies: 1
    Last Post: 07-28-2011, 09:30 AM
  2. Replies: 1
    Last Post: 07-28-2011, 08:34 AM
  3. Replies: 4
    Last Post: 12-16-2010, 12:45 PM
  4. Can't Find Misspelled Query Name
    By jhillbrown in forum Access
    Replies: 5
    Last Post: 03-11-2010, 02:28 PM
  5. Changing the record source in a form
    By lmichaud in forum Forms
    Replies: 1
    Last Post: 07-09-2006, 09:20 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