Results 1 to 2 of 2
  1. #1
    Roundtrip42 is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Apr 2018
    Posts
    1

    Add many to many relations with existing entires and search

    Hello everybody,

    so I have a table called "document" which stores various kinds of documents and a table "person" which stores information about people. One document can have many people in it and one person can occur in many documents. I have an additional table in my database called document_person to make this many to many connection.

    What I want is to have a form, that shows a document (where i can click through all documents) and at the same time shows all person entities connected to the showing document. So far so good, because I managed to do that.


    But what I cannot do is add exisiting entries from the "person" table to one document. I imagined some kind of button, and onclick it opens a popup where I can search for specific person entries and choose one or more entries and add them to the document.

    Attached you can find my database design, but it is german.
    I hope someone can help me with this

    Cheers,
    Attached Thumbnails Attached Thumbnails design.PNG  

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    make a form with a list box of persons, (person.id, VorName & nachname )
    on the form is a combo box of documents.
    user selects a document in the combo,
    then dbl-clicks on a person, this fires an append query that adds the doc ID (id_dokument) and ID_person to the PERSON_DOKUMENT table.

    insert into PERSON_DOKUMENT (ID_PERSON, ID_DOKUMENT) VALUES (forms!myform!lstPerson, forms!myForm!cboDoc)

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

Similar Threads

  1. Search for existing record
    By KH Ahmed Bara in forum Access
    Replies: 3
    Last Post: 05-06-2016, 05:51 AM
  2. Replies: 11
    Last Post: 12-22-2014, 01:57 PM
  3. field with musltiple entires
    By dastr in forum Access
    Replies: 6
    Last Post: 03-19-2012, 03:48 AM
  4. Count responses based on entires of other table
    By VictoriaAlbert in forum Queries
    Replies: 2
    Last Post: 10-18-2011, 11:06 PM
  5. Delete empty entires
    By justinwright in forum Queries
    Replies: 3
    Last Post: 07-22-2010, 11:27 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