MS Access question - Help, please?

Discussion in 'OT Technology' started by Joe_Cool, Jun 24, 2009.

  1. Joe_Cool

    Joe_Cool Never trust a woman or a government. Moderator

    Joined:
    Jun 30, 2003
    Messages:
    299,482
    Likes Received:
    617
    Keep in mind that I haven't used access in many moons, so cut me some slack.

    I have a table for people, and a form based on that.
    I have a table for payments (person, amount, date) and a form based on that.
    On the PEOPLE form, I have the PAYMENTS form as a subform, with the key fields linked to show only payments for the current person.

    So far so good. Now I want to create a new, separate form, so that a single "payment" can pay for multiple people.

    On this form, I want today's date, followed by a variable number of lines, just like an invoice.
    Each line item should include a combo box to select the person that portion of the payment should apply to, and a payment amount.
    Then at the end, a total line that summing all the payments and giving a final amount (no tax).
    The part that's being tricky for me is this: I need each subpayment line to be a new record in the payments table.

    It seemed at first like this should be easy to do, but now I'm not so sure. Can it be done relatively simply?
     
  2. Joe_Cool

    Joe_Cool Never trust a woman or a government. Moderator

    Joined:
    Jun 30, 2003
    Messages:
    299,482
    Likes Received:
    617
    I guess what I'm asking boils down to this:

    Can I get a running sum of items on a subform (that seems like the way to do this?) on the parent form? And if so, how?
     
  3. 5Gen_Prelude

    5Gen_Prelude There might not be an "I" in the word "Team", but

    Joined:
    Mar 14, 2000
    Messages:
    14,519
    Likes Received:
    1
    Location:
    Vancouver, BC, CANADA
    Yes, you put the a formula in the footer of the subform called SumOfTotal

    =sum(ExtendedPrice)

    And then refer to that in the parent form:

    =me!subformname.form!SumOfTotal
     

Share This Page