RE: pass a calculated form field to a subform field?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hi, Brook.

Glad it worked out.

If I understand you correctly, Balance Due = SumofCharges - SumofPayments.
Place a summary field in your payments subform footer (it can be invisible if
you like).

=Sum([PaymentAmount])

If you wish to bring this total to your summary page, just refer to it:

=MyPaymentsSubform.Form!SumofPaymentAmount

Then do your math for the Balance Due.

Hope that helps.
Sprinks

"Brook" wrote:

> Thank you very much...
>
> That worked... I was unaware of the "Parent" as a reserved word.
>
> I do have another question... I'm not sure if you can answer or not..
>
> The setup that was just created is for my invoicepayments subform, which
> takes the invoice total and then allows the user to enter payments that are
> deducted from the total.
>
> What I am trying to do is this:
>
> Payment1 is deducted from the invoice total giving a Balance Due, then each
> additional payment is then deducted from the Balance Due to calculate a new
> account balance..
>
> Do you understand... do you know how I can accomplish this?
>
> Thanks,
>
> Brook
>
> "Sprinks" wrote:
>
> > Hi, Brook.
> >
> > No, I meant it literally--"Parent" is a reserved Access word. Cut and paste
> > the following into the Control Source property of the subform control:
> >
> > =[Parent].[Form]![invoicetotal]
> >
> > Hope that helps.
> > Sprinks
> >
> > "Brook" wrote:
> >
> > > hello Sprinks,
> > >
> > > Thanks for the tip,
> > >
> > > I am assuming that you mean make the value of my invoicetotal on my
> > > subform to be: =frminvoices.Form!invoicetotal
> > >
> > >
> > > When I do this, I get: #Name?
> > >
> > > my "main form/parent form" is called frminvoices, and my field is called
> > > invoicetotal
> > >
> > > the invoicetotal is based on another subform within the same parent form
> > > =[invoicesubtotal]+[ShippingCost]
> > >
> > > so I have two subforms and a main form.
> > >
> > > and I don't know if this matters, but my subforms are located on two tabs.
> > > one for product enty and one for payment enter.
> > >
> > > Thanks for the response..
> > >
> > > Brook
> > >
> > >
> > > Any Ideas?
> > >
> > >
> > >
> > > "Sprinks" wrote:
> > >
> > > > Hi, Brook. Try:
> > > >
> > > > =[Parent].[Form]![invoicetotal]
> > > >
> > > >
> > > > Hope that helps.
> > > > Sprinks
> > > >
> > > > "Brook" wrote:
> > > >
> > > > > hello all..
> > > > >
> > > > > I am trying to pass a calculated form (frminvoices) field (invoicetotal
> > > > > (This is a calculated field)) to subform (frminvoicepayments subform) field
> > > > > (invoicetotal).
> > > > >
> > > > > I know this should be easy, but I have racked my brain on this one...
> > > > >
> > > > > Can anyone help?
> > > > >
> > > > > Thanks,
> > > > >
> > > > > Brook
.



Relevant Pages

  • Re: Closing an Empty Form
    ... What I was attemtping to do with the subform was extract the open invoices ... then calculate and display the original invoice amount, ... current balance due for each open invoice other than through the unweildy ... Using a subsubform was the only way I could see doing this while maintaining ...
    (microsoft.public.access.queries)
  • Re: Invoice Amt. - Payments = Balance
    ... It looks like you have tied payments to invoices such that one invoice can ... You could therefore add a 2nd subform onto your Invoices ... TBLINVOICES inner join TBLITEMS and TBLPAYMENTS on invoiceID ...
    (microsoft.public.access.queries)
  • Re: validation
    ... "Lori" wrote in message ... Only problem seems to be that the invoice amount ... > subform but that didn't work either. ... >>payments from the payment table. ...
    (microsoft.public.access.formscoding)
  • Re: Invoice Amt. - Payments = Balance
    ... The invoice form with a subform for line items sounds right. ... It looks like you have tied payments to invoices such that one invoice can ... TBLINVOICES inner join TBLITEMS and TBLPAYMENTS on invoiceID ...
    (microsoft.public.access.queries)
  • Re: Create a subform to track charges, payments & balance
    ... and a subform based on ... the payments table. ... Set the parent-child relationship to "clientID" on both ... Controls such as balance are calculated. ...
    (microsoft.public.access.gettingstarted)