View Full Version : Time Column


aftabn10
11-01-2009, 10:00 AM
Hi, I am a newbie to the access so please bear with me. I have a table that consists of 3 columns Name, Time, Volume. For example:

Name | Time | Volume

Humpty | 346 | 1
Dumpy | 644 | 262

What I would like to find out is that is it possible to add an extra column that will multiply the volume by time and then display this in HH:MM:SS format, like the following:

Name | Time | Volume | Total

Humpty | 346 | 1 | 00:05:46
Dumpy | 644 | 262 | 22:52:08

Thanks in advance.

John Big Booty
11-01-2009, 11:07 AM
It is possible to do what you want. However it is considered bad practice for a number of reasons;

If one of the underlying values changes this change will not automatically ne reflected in the calculated values, as would happen in excel
Why waist space storing a value that can be calculated at any time, when it is required?

You are best off either calculating this value using an unbound text box (formatted to Long Time) with the Control Source set as;
=[YourTimeField]*[YourVolumeField]
Or alternatively if you are using a query, calculate the required value in your query.

Galaxiom
11-01-2009, 01:01 PM
[quote=aftabn10;901012]multiply the volume by time and then display this in HH:MM:SS format

That is an unusual calculation.
The units would then be cubic metre seconds (or the Imperial equivalent).
I can't picture an entity with such an odd attribute.

John Big Booty
11-01-2009, 01:25 PM
[quote=aftabn10;901012]multiply the volume by time and then display this in HH:MM:SS format

That is an unusual calculation.
The units would then be cubic metre seconds (or the Imperial equivalent).
I can't picture an entity with such an odd attribute.

I had assumed Volume to be the number of Units (or similar) and that Time was the time required to produce one unit and the end calculation was for the time required to produce a given number of those units.

Galaxiom
11-01-2009, 01:30 PM
I had assumed Volume to be the number of Units (or similar) and that Time was the time required to produce one unit and the end calculation was for the time required to produce a given number of those units.

Ahhhh. Volume as a quantity. That makes sense. I had to ask or I would have wondered about it all day.:D

John Big Booty
11-01-2009, 01:55 PM
Ahhhh. Volume as a quantity. That makes sense. I had to ask or I would have wondered about it all day.:D
I don't think it was an unreasonable conclusion that you came to. Just one of the joys of the English language :D