1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Display subform in a main form with other fields from main form

Discussion in 'Business Applications' started by Servace, Dec 23, 2008.

Thread Status:
Not open for further replies.
Advertisement
  1. Servace

    Servace Thread Starter

    Joined:
    Dec 23, 2008
    Messages:
    3
    I am using Windows 2003 with Access 2003. I have a main form that uses fields from a table that I would call the Master table, and this form has several tab pages in it. In this form the 2nd tabbed page uses a subform which displays data from a different table (I call it the Job Number table). I have linked these two tables with a one to many relationship. One of the fields in the Job Number table is named "Contract Amount". So each job record in the Job Number table tracks a separate Contract Amount value, but it is linked to the Master table through the one to many relationship. My goal is to sum all of the the Contract Amount values for each linked Master record and display that amount on my 1st tab.

    I have created a subform that uses a sumquery which sums the Contract Amounts from the Job Number table. I tested the subform and the sum feature against the live data, and it does perform correctly. I then added that subform into my main form on the first tabbed page along with other fields on the same tab page. These other fields come from the Master table. In the Data Entry view, I can see a box where the subform should display, but the data doesn't display. What can I do to force the subform to display data along side the other fields from the Master Table?

    Thanks in advance for your help.
     
  2. OBP

    OBP

    Joined:
    Mar 8, 2005
    Messages:
    19,895
    Well you can have 1 of 3 condition for your subfrom.
    1. Not linked to the mainform, which should show all records, regardless of what is on the mainform.
    2. Linked to the mainform, but not via the Correct Fields, no records, or occassionally a record, but not necessarily thr correct one.
    3. Linked via the correct fields, should show the correct fields in the subform.
    So check your Master/Child Link Properties of the Subform because they supercede your Relationships.
     
  3. Servace

    Servace Thread Starter

    Joined:
    Dec 23, 2008
    Messages:
    3
    In the Properties of the subform within the main form, I removed the Master and Child values altogether, and that fixed the problem. Not sure why that would work, but at least it did. I had originally thought it needed that Master / Child relationship defined. Thanks for your swift help!!!
     
  4. OBP

    OBP

    Joined:
    Mar 8, 2005
    Messages:
    19,895
    Make sure that the Total is correct for your mainfrom record.
     
  5. Servace

    Servace Thread Starter

    Joined:
    Dec 23, 2008
    Messages:
    3
    Everything seems to be working okay.
     
  6. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/782531

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice