Results 1 to 3 of 3
  1. #1
    fuonge is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2013
    Posts
    8

    Adding people to case table from people table.

    I have a system where there could be multiple people connected to a case.



    If I want to add a person to the case or multiple people, I have a popup that allows for searching the system for existing people or adding an unexisting person. Both are frequently used.

    What I want to do is, instead of having that person copy and paste the ID number to sync up the other details, I want there to be a button that once found or added the right person, to just insert the id number into the "add person to case" form. The person form is just a database that keeps track of existing people and is a way to not allow for duplicates.


    How would I do that to automatically, when the person form is closed to insert the ID number into the add person to case form. If that's not the best way to do that, what is a better way to set this up?

    Thank youa

  2. #2
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    So you have at least 2 tables, hopefully 3.

    Case, People and PeopleAssignedToCase

    Case
    -Case1
    -case2

    ...


    People
    -1 Bob G
    -2 Ken H
    -3 Jim J
    -4 Omar K
    -5 Jane Q

    Suppose
    Case1 has Ken H and Bob G already assigned, and Ken H is also working on Case2
    eg

    Case1, Bob G
    Case1, Ken H
    Case2, Ken H

    So if you have a new Case, you must add the Case to the Case table before you can assign someone(s) to it.
    Also, if you have a new person, you ad the Person to the Person table, before you add them to a Case.

    Suppose a new person Felix Z is hired. You add Felix Z to the People table. And also suppose you want to assign him to Case2 (to work along with Ken)

    You could have a combobox of Cases, and a combobox of People, where
    cboCase has rowsource Select caseInfo from tblCase and
    cboPeople has rowsource Select PeopleInfo from tblPeople.

    You Select Case2 from cboCase and Select Felix from cboPeople.
    In the afterUpdate event of cboPeople, you take the CaseID from cboCase,
    and the PeopleID for Felix X from cboPeople to insert/Append a new record to
    tbl PeopleAssignedToCase.

    I'm sure there are other ways, but that's one way.
    Good luck.

  3. #3
    fuonge is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2013
    Posts
    8
    I do have 3 tables. I have no idea why I made this so difficult. Seems to work fine this way vs using the ID. Thank you!

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

Similar Threads

  1. Replies: 11
    Last Post: 05-25-2015, 08:33 AM
  2. Replies: 4
    Last Post: 08-30-2012, 07:58 PM
  3. Table Design one Field - People or Business Name
    By TxTcher in forum Database Design
    Replies: 3
    Last Post: 08-06-2010, 05:40 PM
  4. Replies: 0
    Last Post: 12-28-2009, 12:14 PM
  5. people from table not showing in form
    By corystemp in forum Access
    Replies: 2
    Last Post: 03-26-2009, 08:57 PM

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