View Full Version : Newbie in need of help


Densa
03-07-2005, 05:30 AM
OK here goes.

I'm trying to get a report that looks a bit like a spreadsheet.

Date1 Date2 Date3 Date(n) Total
Job Number1 01:30 10:30 10:30 22:30
Job Number2 08:30 08:30 08:30 25:30
Job Number(n) 08:30 08:30 08:30 25:30
Total Time 73:30

I have made a query that gets all the relevent info for the dates requested, but ....... how do I make it show in this sort of format? I also seem unable to make access want to count above 24 hours!! the above would come out at 01:30. I know in XL you make the format [hh]:mm but all this does in access is put the brackets around the hours!

Any help would be greatly appreciated.

Pat Hartman
03-07-2005, 06:58 AM
I also seem unable to make access want to count above 24 hours!! That's because there are only 24 hours in a day :cool: and it's too smart to be fooled. The date/time field represents a POINT IN TIME, which is quite different from elapsed time. You will need to use regular numeric fields if you want to hold values > 24 hours.

The format you want can be achieved with a crosstab query.

Densa
03-07-2005, 08:08 AM
You will need to use regular numeric fields if you want to hold values > 24 hours.

Pat, Thanks for the cross tab hint. With a bit of playing about I should be able to get the look right :) However ......... how do I get a normal numeric field to calculate in hours and mins?

Your help would be appreciated.

Pat Hartman
03-07-2005, 12:29 PM
Store the value as minutes. Use unbound controls and calculate the hours and minutes value in the form's Current event and then calculate the total minutes and put it in the bound field in the form's BeforeUpdate event.