Caculating

J

JennKriv

I have a database used to track employee hours, I want to be able to
calculate the total hours in a report but I cannot figure out how to make
this happen. Any suggestions?
 
A

Amateur

In a Report you cannot calculate - use a query, and than a report based on
that query.
 
J

JennKriv

Okay, so how do I tell it to calculate, what equations? I'm sorry I tried to
look it up but the help was kind of vauge. Do I need to have a seperate item
for the calculation?
 
A

Amateur

Go to your DB > Queries > Create a query by using the wizard > choose the
fields from your tables which you need for calculation. In an emtpy field
write your calculation Formula (I cannot tell you the formula because I do
not know what you need).
If your query is working and calculating correct - build a report from that
query.

Hope that helps a bid
Klaus
 
B

BruceM

Why do you say that? Unless you are using "calculate" in a different sense
than the usual, there are quite a few way to calculate in a report. The
control source of an unbound text box can contain a calculation expression;
a text box can be set to generate a running sum; calculations can be
performed using VBA; a group of records can be summed, and so forth. And as
you mentioned the calculation can be performed in a query, but it is far
from the only option.
 
B

BruceM

You are not limited to using a query, although that is a good method in many
cases. Please describe in more details just what you need to calculate.
Total hours for one employee over a period of time? A total for each week
or month? Hours by all employees in a department, or by some other
grouping? Are the hours in records related to a main record (for instance,
weekly hours by employee)? A little description of the database's structure
would probably help.
 
J

John W. Vinson

In a Report you cannot calculate - use a query, and than a report based on
that query.

Actually, you can, and it's quite common and routine!

Put a textbox in the report footer, or the footer of a Sorting and Grouping
group, and set its control source to

=Sum([fieldname])

to sum the values in that field for that grouping.

John W. Vinson [MVP]
 
Top