Results 1 to 2 of 2
  1. #1
    chris wells is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2012
    Posts
    1

    Modify existing jobsheet database

    I have a jobsheet database containing an orders table. Its got almost 2000 entries in it.
    Each record contains customer name in full together with other fields for job no, date, description,invoice no
    amount and a numerical job status. Since many customers repeat jobs I would like to add a customer contact table and use the customer data from that table in the orders table.
    I tried a copy of the empty database and containing a lookup for customer in the new contacts table- that works ok.
    any kind of query or append to transfer from the old orders database to the modified new one fails.
    I want to delete all the full customer details from the orders table and replace them with a lookup from a new contacts.
    I thought of exporting the customer names to a new contacts table but there are duplicates.
    any ideas please


    Thanks

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,624
    Can be done, carefully.

    What is nature of 'duplicates' - exact duplicates of customer names or some differences in spelling for the same customer? If misspelling is an issue in the Orders table will have to edit the records to get consistency in names.

    Then create contacts table with unique customer records. Create a query that will get unique names from Orders table.
    SELECT DISTINCT CustomerName FROM Orders;
    Make Contacts table with records from that query.
    Add an autonumber field to create unique ID.

    Create a number field in Orders table for the Contacts table unique ID.

    Build UPDATE query that joins the two tables on the common customer name fields and update the new fk field in Orders with the new pk field in Contacts. When all is good, remove customer name field from Orders table.
    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.

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

Similar Threads

  1. Replies: 5
    Last Post: 04-30-2012, 11:03 AM
  2. Help in changing an existing database
    By adamaphar in forum Access
    Replies: 6
    Last Post: 02-14-2012, 09:55 AM
  3. Back tracing in an existing database
    By meridithdawn in forum Access
    Replies: 3
    Last Post: 06-27-2011, 11:10 AM
  4. Help with existing database
    By byoung11 in forum Database Design
    Replies: 2
    Last Post: 06-29-2010, 06:21 PM
  5. Create an index in existing database
    By blip in forum Programming
    Replies: 1
    Last Post: 05-21-2010, 11:23 AM

Tags for this Thread

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