Results 1 to 11 of 11
  1. #1
    NablaOperator is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Mar 2012
    Posts
    7

    Relate multiple columns to one column

    Hi there!



    I'm building an address file for my company. Now, my most important relationships are the following:

    Click image for larger version. 

Name:	forum.jpg 
Views:	15 
Size:	168.8 KB 
ID:	6676

    Here's the problem for tbl_Persons: I want a link between postadress_ID and 3 other columns.
    In my file, someone can have a 'normal' address, a PO-box or an internal address. I want these 3 types
    of addresses separately.
    Now, how can I make this link? Is this even possible? I don't want to take all types of addresses into one column...
    I want them separately...

    The same problem arises for the table tbl_Organisation.

    I hope you can help me!!!
    Thanks a lot

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    You can set the links but would they mean anything? The field postaddress_ID can have only one value. That value would be the fk for the 3 linked tables. Say the value is 15. That would mean record ID 15 in each of the linked tables is associated with that person's record. I doubt that is correct. You would need a fk field for each address type in tbl_persons. Or a junction table with a record for each person/address association.

    Same applies to tbl_Organization.
    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
    NablaOperator is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Mar 2012
    Posts
    7
    Ok I see what you mean. Let's say I fixed the address type problem. Then there is another problem:
    Click image for larger version. 

Name:	nummer2.jpg 
Views:	13 
Size:	144.5 KB 
ID:	6679
    I now want that the address of an organization comes from the table tbl_Address. I want the same thing for Persons. How can I make this possible?

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Do you still want 3 addresses associated with each person and organization?

    Options:

    1. 3 address fields in each tbl_Persons and tbl_Organization

    2. 2 junction tables, one for each tbl_Persons and tbl_Organization to allow multiple address records for each person and organization

    What is the sub grouping all about?
    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
    NablaOperator is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Mar 2012
    Posts
    7
    Thanks a lot for your time and help!
    No, the 3 addresses problem is not the point anymore, I fixed that. The point now is that a person can have an address. An organization can also have an address. The address data for both organisation and person must come from just one table with a pk field... How can I solve that with an junction table?? I don't understand why this isn't possible in access 2010... or is it?
    Thanks again, I really appreciate your help

  6. #6
    NablaOperator is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Mar 2012
    Posts
    7
    Ow sorry, and the sub grouping is not import for this problem btw :P, but it's basically about our system for identifying a person.

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    One address per person and one address per organization greatly simplifies. Just save address fk in tbl_Persons and tbl_Organization.

    However, what is the relationship between persons and organizations? Can each person have only one organization? Can each organization have many persons? This must be what tbl_Addressenlijst LC is for.
    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.

  8. #8
    NablaOperator is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Mar 2012
    Posts
    7
    You are totally right. There is that table for. So do you see my problem ??? So some people can have more than one organization. Above that, I have got some organizations which are independent: They don't have any persons, I just need the organization itself.

  9. #9
    NablaOperator is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Mar 2012
    Posts
    7
    Ow and above that: sometimes the address of a person is the same as an address for an organization. That's why I want a separate table for just the address. That makes it a lot easier when I want to change a address.

  10. #10
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    I don't see it as a problem. Your last ERD seems appropriate.
    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.

  11. #11
    NablaOperator is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Mar 2012
    Posts
    7
    Thank you for your advise. OK I suppose it should work, I am only not sure about it because I can't see the links in my sub data sheets ... But I supposes the links are now good and a query can link all data?

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

Similar Threads

  1. Replies: 5
    Last Post: 12-01-2011, 05:38 PM
  2. Linking columns in access to a particular column.
    By israellawndale in forum Access
    Replies: 4
    Last Post: 08-16-2011, 02:55 PM
  3. combining 3 columns into 1 new column!
    By joebox8 in forum Queries
    Replies: 7
    Last Post: 07-06-2011, 01:46 AM
  4. Replies: 15
    Last Post: 01-12-2011, 05:13 PM
  5. split a column into two seperate columns
    By nybanshee in forum Access
    Replies: 2
    Last Post: 08-14-2008, 04:52 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