Movian
06-09-2009, 01:44 PM
Hi,
i have the following code
Dim myrs As DAO.Recordset
Set myrs = CurrentDb().OpenRecordset("RoomTrack")
Do Until myrs.EOF
myrs.Edit
myrs.Fields("ElapsedTime") = Now() - myrs.Fields("EntryTime")
myrs.Update
myrs.MoveNext
Loop
myrs.Close
Set myrs = Nothing
Me.RoomStatus.Requery
I am using this to show the amount of elapsed time since the entry time. However its deciding that as its a time field it must be an actual time (E.G. 3PM) rather than an amount of time ( 3 hour and 3 minutes).
How would i go about altering this to ensure that it displays this an amount of time?
i have the following code
Dim myrs As DAO.Recordset
Set myrs = CurrentDb().OpenRecordset("RoomTrack")
Do Until myrs.EOF
myrs.Edit
myrs.Fields("ElapsedTime") = Now() - myrs.Fields("EntryTime")
myrs.Update
myrs.MoveNext
Loop
myrs.Close
Set myrs = Nothing
Me.RoomStatus.Requery
I am using this to show the amount of elapsed time since the entry time. However its deciding that as its a time field it must be an actual time (E.G. 3PM) rather than an amount of time ( 3 hour and 3 minutes).
How would i go about altering this to ensure that it displays this an amount of time?