Good day all,
I have a simple question today that I seem not be able to solve (maybe I need a break).
I have 2 time columns per day, i.e 10 in total.
At the end of the week, I want to add all the elapsed time for each day together in a seperate textbox.
Calculating the elapsed time per day is easy. My issue is to add each days elapsed time together in the textbox. To calculate the time elapsed, I am using a short piece of code found on the internet:
Code:
Public Function ElapsedTime(endTime As Date, startTime As Date)
Dim Interval As Date
' Calculate the time interval.
Interval = endTime - startTime
' Format and print the time interval in hours, minutes and seconds.
strOutput = Int(CSng(Interval * 24)) & ":" & Format(Interval, "nn")
End Function
When the function returns the "strOutput" value, I want to add this to the current value of the tectbox:
Code:
Private Sub Command52_Click()Call ElapsedTime(TimeEnd1, TimeStart1)
Me!Tot_Normal1.Value = Me!Tot_Normal1.Value + strOutput
End Sub
Running the latter produces an error.
Any suggestions?
Thanks
Deon