Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Totals on continuous form 1

Status
Not open for further replies.

ajaeger

Technical User
Feb 6, 2003
201
US
The database tracks employee time by day and cost center. I have a continuous form that has a row for each day of the month. In the columns are different cost centers:

DATE ADMIN MKTG MTG TOTAL
7/1/11 4.5 3.5 0.0 8.0
7/2/11 1.0 0.0 7.0 8.0
....
7/31/11 0.0 0.0 0.0 0.0
TOTAL 5.5 3.5 7.0 16.0


The header row is in the Form Header. The date rows are in Details. The total row is in the Form Footer.

The names of the fields are AdminHours, MktgHours, MtgHours. In the text box for the daily totals, the control source is:
=Sum([AdminHours]+[MktgHours]+[MtgHours])

In the text box for the total in the Form Footer, the control source is:
=sum([AdminHours])

For each total field, I keep getting #Error.


Anna Jaeger
iMIS Database Support
 
How are ya ajaeger . . .

Have a look at the [blue]Nz[/blue] function:
Code:
[blue]=Sum(Nz([AdminHours])+Nz([MktgHours])+Nz[MtgHours]))

=sum(Nz([AdminHours]))[/blue]
[blue]Your Thoughts? . . .[/blue]

See Ya! . . . . . .

Be sure to see faq219-2884 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
ajaeger . . .

Disregard my prior post and check the following:

Make sure that the field specified in the control's ControlSource property hasn't been removed from the underlying table or other record source.

Check the spelling of the field name in the control's ControlSource property.

If you specified an expression in the control's ControlSource property, make sure that there is an equal sign preceding the expression.

Make sure that there are brackets around references in expressions to control or field names that include spaces. For example, to subtract a Shipped Date field from a Required Date field, enter the following expression: =[Required Date]-[Shipped Date].

If you are using one of the built-in functions, make sure that you're using the right number of arguments, that the arguments are in the right order, and that you haven't left out any necessary punctuation. To determine the correct syntax to use, see the Help topic for the function you're using.
If you are referring to another control, make sure that you're using the correct syntax. For more information on referring to controls, click .

[blue]Make sure that there isn't a circular reference[/blue] to a control. For example, if you specify MyControl in the Name property of a control, and then type =[A]++[MyControl] in the ControlSource property box for the control, Microsoft Access can't process the expression.


See Ya! . . . . . .

Be sure to see faq219-2884 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Thanks AceMan! I was able to get the total for the day working on my form. Still getting an error in the total by cost center. But I was able to create a new form and have both working. There's something really simple that I'm overlooking. May just recreate everything in the new form that's working... Thanks again. AJ

Anna Jaeger
iMIS Database Support
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top