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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add time values together to get total time NOT elapsed or difference ?

Status
Not open for further replies.

Event2020

Technical User
Sep 17, 2001
12
GB
Hi,

Before I carry on I just want to say that some very kind people have tried to help me before (I am so grateful to them) but sadly it still does not work. I have searched and searched for help on this but all the postings I can find are about time differences between a start time and end time on time sheets and so on - there is nothing specific about adding a number of times together to get a total time.

All I want to do (in simple basic terms)is this. Imagine that you have a CD Database that displays info for each CD on a form.
The form displays track info for the selected CD and I want Access 2000 look at the set of songs currently displayed in the form, then look at a field called Length, (The length field displays the running time for each song) and total up the running times for all the songs for the selected CD, write this into a field called TotalTime in a table and then display this in a field on the form.

For example:
CD 1 - Track 1 = 3:30 (minutes & seconds)
added together with:
CD 1 - Track 2 = 3:30 (minutes & seconds)
gives a total running time of 7:00

As a new song is entered (or removed) for the selected CD, it would be great if the total time is updated to reflect the changes.

To me this seems like a simple thing to have Access do but, as yet, I can not get it to work. I KNOW it can be done because I HAVE seen it in other access databases. I dont mind if this is done in code or in a query or by some other means but I REALLY need to have this working.

Please, can someone kindly help me.

Thank you so much in advance,

Event2020
 
Event,
If the time field you want is in text format, and always nn:ss (minutes:seconds), then you can use a date to do what you want. Use format hh:nn:ss (or just nn:ss--but you must remember to enter data with the hours, ie 0:3:30 for 3 min, 30 sec.)

I'm not seeing why this wouldn't have worked. When you add those up, you get total time, just format it the same way. I just did a quick sample and used dsum() over a date field with nn:ss entered, it worked fine. Let me know if there's something else I should know to be of help on this...
--Jim
 
Jim's right, this does work see thread701-142636. This was a similar problem with a couple different resolutions.....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top