Calculations in tables...

deejay_totoro

Registered User.
Local time
Today, 19:46
Joined
May 29, 2003
Messages
169
Hello,

I wonder if you can help me?

I am trying to do a simple time calculation, where I can calulate the duration of a call.

I can do this in the form (using =[EndTime]-[StartTime]) and the correct duration is displayed.

However, this information is not passed to the underlying table.

So my question is: how can I store this duration in the underlying table field (duration)?

I read in another post that it is not good to do calculations in tables in access (is this correct?) so I made a query - which dies calculate the duration properly.

However, the problem still remains - how do I pass this duration information, from either the form field - or the query - back to the corresponding field in the original table?

Thank you very much!

dj_totoro
 
As you found in another post, don't store calculated data in your table.
Use your query to calculate them and show the results of your calculation.

RV
 
passing the result

Thanks for your reply!

How can pass the calculation back to the table (and form?)

dj_t
 
DON'T store calculated data in your table.

To display it in your form, you can base the form on your query, or use an unbound textbox with the same expression as it's control source.
 
Storing calculated information is a waste of your database's resources and is a violation of third normal form.

Calculated values, such as yours, are easily obtainable at runtime.

Try, if you can, to perform as many calculations as possible on your form and reports.

Although calculations in queries are possible they should be seen as a last resort as calculations can slow down queries (sometimes) almost to a standstill.
 

Users who are viewing this thread

Back
Top Bottom