I need to be able to reflect total hours worked. On my form I have
two fields StartDate and Enddate both fields have the full date and
time. this is the code I have but the result is not correct based on
the data in the two fields.
StartDate = 10/05/2005 11:25:00 AM
EndDate = 10/05/2005 6:00:00 PM
Total Hrs worked should equal 5.25hrs.
Here's My code where am I going wrong.
Function NoHours()
On Error GoTo noHourserr
Dim y As Double
Dim z As Variant
y = DateDiff("n", Forms![UfrmTaskactions]![StartDate], Forms!
[UfrmTaskactions]![EndDate]) / 60
NoHoursExit:
Exit Function
noHourserr:
MsgBox Err.Number & " " & Err.Description
Resume NoHoursExit
End Function
------------------------ Yahoo! Groups Sponsor --------------------~-->
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/q7folB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ms_access/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/