calculated fields

C

Chely

hi everyone. I know this a topic that has been discussed before but i
search all postings and i can't found an answer to my problem.I know a
litle vba and access and i trying to do a calculated field.Here is my
problem: I need to calculated the hours spent in a service call,and the
hours spent biweekly. THis data have to be stored in a table so i can
retrieve it monthly. How i can do it. Thanks and sorry to ask this
again.
 
L

Larry Linson

Calculations should be performed when needed in relational databases. Thus,
unless the information from which the "hours spent in a service call" and
"hours spent biweekly" is no longer available, you should calculate the
values when you need them, monthly.

"Calculated Controls" cannot be bound to a Field in a Table for that
reason -- it is a violation of relational database design practices.

Larry Linson
Microsoft Access MVP
 
C

Chely

so, how i can sum all hours spent biweekly in a query? I type in the
query Field Total:Sum([Working Time]) and in Total Expresion and what
it does is repeat the data in that record. What i have done wrong?
Thanks
 
T

Tom Lake

Chely said:
so, how i can sum all hours spent biweekly in a query? I type in the
query Field Total:Sum([Working Time]) and in Total Expresion and what
it does is repeat the data in that record. What i have done wrong?
Thanks

To sum records in a query, use the DSum function. You also have to
specify what table to sum. Check help for other options with this function

Tom Lake
 
L

Larry Linson

A Totals Query with a date range as its critieria (the WHERE option) should
do what you want, as could the DSUM statement that Tom suggested (if you
need it in VBA code).

Larry Linson
Microsoft Access MVP
 
Top