Re: HELP PLEASE! Question about Expression Building and data entry.

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Rick B (anonymous_at_discussions.microsoft.com)
Date: 08/03/04


Date: Tue, 3 Aug 2004 08:07:51 -0500

Also, the reason it is not storing is because you changed the control
source. If you took out the field name, how would it know where to store
the results? If you insist on keeping this poor design, you would need to
put the total field back in yout control source. Somewhere in code (maybe
in the before update) you'd need to tell it to slam a value in that field.

Private Sub Form_BeforeUpdate(Cancel As Integer)
TotalPayments=Payment01+Payment02+Payment03+Payment04
End Sub

"Viken Karaguesian" <vikenk@NOSPAMcomcast.net> wrote in message
news:g7adnWyySY-qkJLcRVn-vQ@comcast.com...
Hi all,

I hope someone can help me.

I'm building a database for a cousing of mine. In it, she wants payments to
be totalled. For that I have four fields: Payment01, Payment02, Payment03,
Payment04. These four fields are totalled into a 5th field called "Total
Payments". I made a form for the table.

I was able to figure out how to total the four fields: I brought up the
properties to the "Total Payments" field and in the "Control Source" box I
built an expression; =Payment01 + Payment02 + Payment03 + Payment04.

This expression worked - the four fields were totalled in the last field.
The problem is the final data does not make it into the table. When I open
the form, I can see the proper totals and values in the "Total Payments"
field, but when I open the table the "Total Payments" fields are ALL EMPTY.

I suppose that the underlying problem is that I changed the "control source"
of the "Total Payments" field. HOw can I get Access to total the four fields
AND put the results in the table? Any help would be appreciated. Thanks in
advance.

Viken Karaguesian



Relevant Pages

  • Re: HELP PLEASE! Question about Expression Building and data entry.
    ... the reason it is not storing is because you changed the control ... In it, she wants payments to ... I can see the proper totals and values in the "Total Payments" ... I suppose that the underlying problem is that I changed the "control source" ...
    (microsoft.public.access.queries)
  • Re: Problem with totals on subforms
    ... I've got a main form (frmMain) with 5 subforms on it. ... is to record payments by 'source' so frmMain's source is a ... totals up all the payments, ... "Total of Payments" control on the frmMain. ...
    (comp.databases.ms-access)
  • RE: Allocate payments
    ... Sumis simply the total of all payments made ... Sumtotals all of the original invoice values above the row in ... I have a list of unpaid invoices in two columns. ... Normally payments would be allocated to the oldest debt at the top and ...
    (microsoft.public.excel.misc)
  • Re: sum sub levels.
    ... Level 2 totals from level 3 totals, perhaps with color, but are there more levels ... 6350623 prem on debt protfolio restruct prem on debt protfolio restruct ... 6340623 retail bonds retail bonds ... You'll notice that I have to add (PAYMENTS, TRANSFERS AND SUBSIDIES, ...
    (microsoft.public.excel.misc)
  • Re: Problem with totals on subforms
    ... All subforms are linked to different hidden controls on frmMain. ... Payments record into a table called tblPayAdjTransactions and then will later post into the regular transactions file. ... It's linked to frmMain by the BatchPaymentID and totals up all the payments, regardless of client from tblPayAdjTransactions. ... It works, when the form initially loads (so, if all the payments equals $837.52 when I first open frmMain, I get that in the "Total of Payments" control on the frmMain. ...
    (comp.databases.ms-access)