In my table I have Hrs as a field (Number) and Min as a Field (Number)
I built a query to sum on HRS and Min and use the function below to call from a query, so I can convert 1700.25 to Days, Hrs, Min
I keep getting an error that my expression contains an ambiguous name in my query
Not sure if this Function is setup correctly or my query is incorrect.
Code:
Option Compare Database
Option Explicit
Public Function ActualTimeWorked(minutes As Long) As String
Dim dd As Integer, hh As Integer, mm As Integer
dd = minutes \ 1440
minutes = minutes - dd * 1440
hh = minutes \ 60
mm = minutes Mod 60
ActualTimeWorked = Format(dd, "000") & ":" _
& Format(hh, "00") & ":" & Format(mm, "00")
End Function