Results 1 to 3 of 3
  1. #1
    dsajones is offline Novice
    Windows Vista Access 2007
    Join Date
    Jun 2012
    Posts
    19

    Simple report with master/detail records

    Hi,



    I've really struggled to find the information in Access help on how to create a very simple report as follows. It's a database of pupils with a record of each lesson they've had.

    Master table - Pupils. Primary key is pupilID. Usual fields of name, address, phone etc.
    Detail table - Lessons. Primary key of pupilID plus lesson date. Table contains lesson date, time, topic and outcome.

    So I want a report where at the top of each page is the pupil details from the master table. Then a list of all lessons attended with the information from all fields in the Lessons table. It's exactly the same concept as an invoice with a header and individual details except I don't need any totaling of anything, just a simple record of the lessons attended.

    I've tried using the report wizard and sort of assumed that the grouping option was what I wanted. But that didn't work at all.

    Help!!

  2. #2
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    Create a query that joins the two tables so that each Student's data [from both tables] is in one row of the Query.
    Eg:
    Select Master.Field1, Master.Field2 . . . Detail.FieldA, Detail.FieldB . . .
    From Master, Detail
    Where Master.PupilID = Detail.PupilID;

    Once you do that - you can use the Query as the data source to build the report on.
    Since all the data you need for each student will be in the query - you can use the Report Wizard and let it set up your Grouping etc.

    Let me know if you have questions.

  3. #3
    dsajones is offline Novice
    Windows Vista Access 2007
    Join Date
    Jun 2012
    Posts
    19
    Thanks Robeen. OK, that makes sense.

    Cheers
    David

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

Similar Threads

  1. Combine master detail records in one query
    By mariost in forum Queries
    Replies: 4
    Last Post: 05-14-2011, 11:25 AM
  2. Master/detail form problem....
    By dkperez in forum Forms
    Replies: 5
    Last Post: 04-01-2011, 04:28 PM
  3. Master Detail Web Form - Access 2010.
    By Robeen in forum Forms
    Replies: 2
    Last Post: 03-21-2011, 02:34 PM
  4. How to code master detail relation in tabforms
    By AshokS in forum Programming
    Replies: 18
    Last Post: 12-20-2010, 08:15 PM
  5. Enable button in the master form when clicking in the detail
    By DistillingAccess in forum Programming
    Replies: 8
    Last Post: 08-03-2010, 10:54 AM

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