Results 1 to 2 of 2
  1. #1
    frons's Avatar
    frons is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Apr 2015
    Location
    Belgium
    Posts
    17

    Lightbulb Many-to-many

    Goodmorning, I have problems with multiple instances of the same foreign key in a single table.
    Click image for larger version. 

Name:	ERDPlus.png 
Views:	19 
Size:	9.0 KB 
ID:	43923
    What I have is the tabe tblHerbs that contains some records which are linked to the same foreign table (i.e. season1Herbs and season2Herbs are linked to the same table tblSeason, and so on...).


    At this point I have two questions:
    1. How should I set the relations between these two tables?
    2. How should I prepare the query that allows me to select ALL the records from the tblHerbs table?

    Any help will be greatly appreciated.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,898
    tblSeasons would be used twice. Relationships builder will show them named like: tblSeasons, tblSeasons_1. Same for tblClimate.

    If you want to select all records, just don't use filter criteria.

    Can some herbs be associated with both seasons and/or both climates?
    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.

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

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