Hi all I have a database that has Access 2007 in the front end and SQL Server 2005 as the engine. On one of the forms the users enters the time a participant has a session and the time they leave so [beginning time] and [end time] then [earned hours]. What I would like to do is just have the users enter the time they came in and then have the total hours pop up on the [earned hours] field. this is what I have for the birthday field
I would just store the [start time] [endtime] and [Minslaps] but would display the Hours:mins
only because hours is a mod 60
ie 50mins + 50mins = 100mins or 1:40
here some code I use to convert mins to hours
If num < 60 Then
MintoHrs = "00:" & Format(num, "00")
hh = Int(num / 60)
Temp = (hh * 60)
MintoHrs = Format(hh, "00") & ":" & Format((num - Temp), "00")
why store the [Minslaps] month end reporting will be easyer to work out
=MintoHrs(Sum([Minslaps])) sumed and format in one step
only problem is some total will look like 1988:43 my company hasn't ask to convert that to days:hours:min YET waiting (have done it)
other little problem is the Sum([Minslaps]) gets very big number
it work in Query as well
Last edited by myle; 02-08-11 at 06:12.
hope this help
See clear as mud
the aim is store once, not store multiple times
Remember... Optimize 'til you die!
Progaming environment: Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010 VB based on my own environment: vb6 sp5 ASP based on my own environment: 5.6 VB-NET based on my own environment started 2007 SQL-2005 based on my own environment started 2008 MYLE YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.