Sum() problem on ADP subform



I'm sure this has been answered before but I can't dig up any posts that
give a good answer.. and I'm sure I've come across it before but forget how
I dealt with it.

I have an ADP (A2000, SQL2000). I have a form with a linked subform. The
subform list expense records and there is an unbound calculated textbox in
the form footer to Sum() the amounts. It works fine if the subform is
brought up by itself, but when it is used as a subform it displays #error.

It also used to not work when the subform was brought up by itself but I
worked out it didn't like another total textbox I had (I changed
=Sum([Amount]/12) to Sum([Amount])/12 to fix it). I have since removed all
other total textboxes so only the simple Sum() is left.

I could try and do the summing on the SQL server but I need the resulting
recordset to be updateable.

Since I only need the simple sum() (all others totals are derived from this
figure) I could just call a SP on the main form to get this total after an
update to the expense records is made... I don't like this approach but if
it works I guess it's the way I'll have to go.

Thoughts?
--
regards,

Br@dley


.



Relevant Pages

  • Re: Sum() problem on ADP subform
    ... I have a form with a linked subform. ... but I worked out it didn't like another total textbox I had (I changed ... removed all other total textboxes so only the simple Sum() is left. ... If I click on the subform and press Shift-F9 the totals appear. ...
    (comp.databases.ms-access)
  • Re: summing records in sub form
    ... but I do need a sum function. ... What i would need it to do in this case is sum the latest values from each ... That would imply that you need a related subform ... The Row Source of the list box would be a Totals query that gives ...
    (microsoft.public.access.forms)
  • Re: Total from a subform
    ... Thank you that was the problem once I added the sum function to the formula ... Never base a calculation on a calculation, ... Create the calculated field in the form footer of the subform like ... Ensure to name the control a name you will remember such as ...
    (microsoft.public.access.forms)
  • Re: Automatic editing - or a bug in Access?
    ... > In a form with a subform, I want to show the sum of all calculations ... The sum control in the form should have the Control Source ...
    (microsoft.public.access.forms)
  • Re: Record sum from subform
    ... You can *display* the sum of the items in the subform, but please do not store the total in the main form's table. ... I have a sub form which contains purchase order items. ...
    (microsoft.public.access.forms)