Results 1 to 5 of 5
  1. #1
    booismycat is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2014
    Posts
    12

    Table Design


    I'm stuck with a table design and hoping I can get a little guidance.

    My data consists of peoples first/last names along with their spouse or partner's first/last names. Partner's last name may or may not be the same as the other person's last name.

    Ex:
    Roy Rogers & Dale Evans.
    Mickey Mouse & Minnie Mouse
    Popeye the Sailorman (no spouse or significant)

    After each name is paired with spouse or significant other (if available), I need to pair them with at least one and maybe two addresses.
    So, this would require a one-to-many table relationship.

    Doesn't sound difficult.


    But, here is where I stumble:

    I created a NAMES table that contains one name per record.
    I created an ADDRESS table that also contains one address per record.
    I created a JOIN table so that each name record can be associated with one or more addresses.

    This works - up to this point.

    My problem - How do I identify Roy Rogers is with Dale Evans or Mickey Mouse is with Minnie Mouse?
    I need to be able to select either name and link them to other tables further into this project so combining the names as one record doesn't seem to be the right solution.

    If Roy and Dale have two addresses, I want a query that lists TWO records - not four. With no link to Roy and Dale, a simple query of FirstName/LastName/Address will produce two records for every name linked by the join table. Two names = 4 records.

    What am I missing?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,646
    So maybe have a SigOther field in NAMES. Insert the record ID of person who is the partner. To get the SigOther info in query NAMES table will self-join. This is a recursive data structure.

    Otherwise have an AccountID or FamilyID field in NAMES.
    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
    booismycat is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2014
    Posts
    12
    I can insert the recID into a SigOther or FamilyID field using vba but at the moment have no clue how I would pull related records via a query using your method.

    If I have
    Record #1 with RecID = 1 and Name is Roy Rogers and
    Record #2 with RecID = 2 and Name is Dale Evans

    Using a form and vba, I can insert 1 into SigOther for Record #2 and/or 2 into SigOther for Record #1...

    But, I see no way to query these two records based on what is in SigOther to correctly match the two names.



    Can you clarify?

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,646
    You can't because there is no data to indicate what records are related. This is the data you need to create. You will have to do data entry to add the new data. This will be a long and tedious effort.
    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.

  5. #5
    Join Date
    Apr 2017
    Posts
    1,776
    So you need 2 additional tables. In one you define e.g. family, in other you attach people to family.

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

Similar Threads

  1. Replies: 1
    Last Post: 09-19-2016, 12:03 PM
  2. Replies: 3
    Last Post: 04-27-2014, 08:08 PM
  3. Table Design -- want to avoid a design that creates blank fields
    By snowboarder234 in forum Database Design
    Replies: 4
    Last Post: 10-08-2012, 10:13 AM
  4. Replies: 8
    Last Post: 03-24-2012, 11:03 AM
  5. table design: one big table vs. multiple small tables
    By lstairs in forum Database Design
    Replies: 3
    Last Post: 12-31-2009, 08:46 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