Results 1 to 8 of 8
  1. #1
    Lois is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2011
    Posts
    15

    Many to many relationship on a report

    Hi


    i have a report which i want to show data that is part of a many to many relationship (different item Nšs & QTYS). how do i get it to show each Item nš & qty per customer?

    thanks

  2. #2
    alansidman's Avatar
    alansidman is offline Indifferent
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,536
    If you have a many to many relationship, you will probably need to have an intermediate table, called a junction table. Here is an excerpt from MS Knowledge Base on Many to Many relationships

    Many-To-Many Relationships

    In a many-to-many relationship, a row in table A can have many matching rows in table B, and vice versa. You create such a relationship by defining a third table, called a junction table, whose primary key consists of the foreign keys from both table A and table B. For example, the Authors table and the Titles table have a many-to-many relationship that is defined by a one-to-many relationship from each of these tables to the TitleAuthors table. The primary key of the TitleAuthors table is the combination of the au_id column (the authors table’s primary key) and the title_id column (the Titles table’s primary key).
    HTH
    Alan

  3. #3
    Lois is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2011
    Posts
    15
    Hi
    i have the tables set up correctly for a many to many relationship, but how do i show the 'many entries on the report???

  4. #4
    alansidman's Avatar
    alansidman is offline Indifferent
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,536
    You will have to post more information or post a copy of your data base. In either event, indicate an expected outcome of what you would like your report to look like and show. Not enough information to guide you on what you need to do here. What is the recourd source for the report, table or query? field names? etc.

  5. #5
    Lois is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2011
    Posts
    15

    Report

    Hi,
    is there any other way i can post my database other than through the manage posts as it always says the file is too big...

  6. #6
    alansidman's Avatar
    alansidman is offline Indifferent
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,536
    Suggest you run a compact and repair. If that does not make the db small enough, then you can zip it and it will probably fit. If that doesn't work, then make a copy and only include sample data showing a representation of your informtion. If you do that, run a compact and repair again before uploading.

    One last thing, many users of this forum are still running AC2003 (.mdb). To get maximum visibility, suggest you save your file as an AC2003 or earlier version before uploading.

    Alan

  7. #7
    Lois is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2011
    Posts
    15

    Many to many relationship on a report

    Ok i have managed to upload it now..
    the report is the urinal manufacture sheet & i need each item & qty in the job item link table to appear in the body of the report...
    thanks

  8. #8
    alansidman's Avatar
    alansidman is offline Indifferent
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,536
    I created a sub report of the Parts and Qty and inserted it into the primary report. You can change it up as necessary. I linked the main report and sub report on the Job No. This is similar to setting up a sub form in a main form.

    Post back with your questions.

    Alan

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

Similar Threads

  1. relationship
    By slimjen in forum Forms
    Replies: 1
    Last Post: 09-26-2011, 07:15 PM
  2. many-to-one relationship
    By reverze in forum Access
    Replies: 7
    Last Post: 07-14-2010, 10:03 AM
  3. Replies: 1
    Last Post: 03-31-2010, 11:57 PM
  4. PLEASE HELP one to many relationship and a Report
    By ladieballer2004 in forum Reports
    Replies: 5
    Last Post: 08-28-2009, 07:59 PM
  5. Replies: 1
    Last Post: 12-29-2005, 01:15 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