Results 1 to 3 of 3
  1. #1
    Jen0dorf is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Jul 2015
    Location
    UK
    Posts
    453

    unable to populate a foreign key

    Hi



    I suspect there is no answer to this question apart from input the data manually but I live in hope.!!

    I have a database - which I have been working on for some time with lots of help from the forum.- which was originally made up of two tables that were not linked.

    So I split one table into two and then populated a linking table to link to the other table. Up till I wanted to integrate the second table it all worked with test searches etc working perfectly.

    Ok in my linking table I have a field fk_MemorialId which should link to the memorial table field MemorialID which is a primary key.

    However the fields in the table are Mlink,Inscription,Links,PLot and GraveNo and None are unique.

    ie Mlink can refereed to several graves , links is an empty field, GraveNo and PLot refer to a location that can have severed bodies is it. Innscription again is not unique and illogical as it sounds the inscriptions in the table tblmemorial bear little similarity to the inscription filed in the othee tables I suspect the original developer gave up on linking.

    So I am at a loss for ideas as to how to populate this linking field.

    Does anyone have an idea?

    I do realise that in the relationship chart below fields are duplicated and will delete them but I was hoping to use the fields as criteria for an update.

    Thanks


    Ian
    Attached Thumbnails Attached Thumbnails relationship2792015.jpg  

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,972
    Still don't know what MLink is for.

    Surely a grave can have only one memorial plaque? Why do you need all these fields? Why not just one memo field that has the full text of the plaque inscription?

    Suggest you proofread your posts before committing to forum ("severed bodies")
    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
    Jen0dorf is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Jul 2015
    Location
    UK
    Posts
    453

    updates

    Sorry about the "severed body" spell checker changed it to the "foot in Mouth" spelling.

    Yes a grave can have two memorial plaques depending on how many coffins/bodies are in the grave. Often a husband and wife are interred together and they have one plaque but if the grave is "out of date" and another coffin is added there can be two or even three memorial plaques.

    As to mlink this was originally set-up by the first developer but he failed to create a link between the original two tables- a fact that was pointed out to me in a previous post. I suspect that the Mlink in the graves table was a primary key and the foreign key was in the table that held all the memorial details. As the database has now been populated with over 39000 records I'm trying to avoid re inputting all the data.

    I think I'll go back to the original and try to establish the link and take it from there

    thanks for the input

    Ian

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

Similar Threads

  1. Replies: 10
    Last Post: 05-08-2012, 09:17 AM
  2. Replies: 2
    Last Post: 04-19-2012, 11:29 AM
  3. Unable to populate textbox based on listbox
    By marcustofeles in forum Forms
    Replies: 21
    Last Post: 10-24-2011, 07:18 AM
  4. Multiple Foreign Help
    By Dalagrath in forum Access
    Replies: 2
    Last Post: 11-01-2010, 10:25 AM
  5. Getting a foreign key set
    By bkelly in forum Access
    Replies: 5
    Last Post: 08-18-2009, 09:22 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