Results 1 to 5 of 5
  1. #1
    farner is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Nov 2011
    Posts
    5

    Subform within a Subform within a Mainform

    I'm using Access 2007.



    This is my setup:

    Tables: Students, Parents, Tuition, Payments, Faculty

    My database is for a school that involves Students, Faculty, Parents, Tuition, and Payments. What I have is the Students listed under their Parents (they register as families), and the Payments listed under Tuition (so that it shows the list of payments and dates).

    Each set of parents has a Guardian ID, and Students are listed under their Parents by Guardian ID. Tuition also has Guardian ID, and payments should be listed under Tuition by Guardian ID.

    The issue I'm having is when I register a family (input a Parents record and the related Students), I need, on the same form, for a Tuition record to be made so that when I input the payments (Date of Payment, Payment Amount), the Tuition Table will have the list of payments underneath a Tuition record with the same Guardian ID as the related Guardian ID in Parents.

    The Tuition Table is supposed to be the same as the Parents table, except rather than show students underneath each Tuition record, it shows the payments (from the Payments Table).

    I have a form that allows for the input of the parent information, with a subform in it for inputting student info, linked to the main form through the Guardian ID. That works fine. What I'm having an issue with is including a second subform, which allows for input of payments. I want the payments to have the same Guardian ID as the current Parent record, as well as for them to show up under Tuition, which also has the same Guardian ID as the parent record, in order for it to all be for the same family.

    What I did at first was put a subform for payments (continuous) inside a subform for tuition, and then plugged that subform into the main form. I linked the Payments and Tuition forms with the Guardian ID, and the Tuition and Main form with Guardian ID. The first time I did it, it worked great, except it wouldn't allow me to create any new Parent records. As I was trying to fix that (I just needed to select the Cascade Update and Delete options in the relationships - but I didn't find that out till later), I tried to replicate what I had done the first time, but it didn't work. Now I can't do it at all anymore, and I lost the first file while playing around (I should have saved and backed up the file). Everytime I input info for the Parents, Students, and Payments, the Parents and Students comes out fine, but the Tuition and Payments have no Guardian ID and are not linked. I don't know what to do.

    This is the first time I've ever used Access, and so my knowledge of things is minimal. I'll be grateful for any help.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,962
    Would have to look at the project to analyse issue. You can attach it to a post. Make copy and remove confidential data. Run Compact & Repair, zip if still large. The Attachment Manager is below the Advanced post editor.
    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
    farner is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Nov 2011
    Posts
    5
    Thank you so much for taking the time to look into it. It's attached.
    Attached Files Attached Files

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,962
    Need some more information.
    Will this database include multi-year data?
    Will partial payments on tuition be allowed?

    Initial observations:
    1. Family Registration form RecordSource should be table Parents.
    2. Students subform Master/Child links should be just GuardianID.
    3. Do not save parent names in Students table, just the GuardianID key.
    4. Do not save student age, just birthdate, calculate age.
    5. Tuition and Payments tables do not have a relationship to each other. Each has a relationship to Parents.
    6. Do not save TotalPayments, TotalTuition, Balance to tuition table. This is aggregate data and should be calculated by summing records. Quite possibly tuition table is not needed.
    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
    farner is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Nov 2011
    Posts
    5
    It's just for a single year.
    Yes, partial payments are allowed, and their sum is calculated in the PaymentSum query.

    The sum of tuition for the students under each parent is calculated in the TuitionSum query.

    1. & 2. : The RecordSource includes Faculty in order to include the student under their teacher's name when I need to make student rosters. That is also why it is linked by Faculty ID as well.

    5. Would I then make a PaymentID field under Tuition and use that to link the Payments to Tuition, and then Tuition to Parents?

    6. TotalPayments, TotalTuition, and Balance aren't actually saved, they're just left over fields from my previous attempts. All three are actually calculated under the Tuition - English report. I apologize for the confusion, I should have cleaned up.

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

Similar Threads

  1. Link between subform and mainform
    By crowegreg in forum Forms
    Replies: 2
    Last Post: 08-24-2011, 07:05 AM
  2. Link SubForm to UnBound MainForm
    By JonMulder in forum Forms
    Replies: 0
    Last Post: 04-09-2011, 08:43 AM
  3. MainForm/SubForm question
    By 10 Gauge in forum Forms
    Replies: 5
    Last Post: 03-04-2011, 07:46 AM
  4. Filter a subform based on mainform
    By Cheshire101 in forum Queries
    Replies: 3
    Last Post: 01-06-2011, 12:56 PM
  5. Replies: 0
    Last Post: 03-14-2009, 12:33 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