J
James
I have a subform that is a continuous form with an Event
Procedure in it. Part of the coding is as follows, the
rest is just Dim and Error.
Hours = Me.End_Time - Me.Start_Time
If Hours < 0 Then
AdHours = Hours + 24
Else
AdHours = Hours
End If
Me.Hours = Hours
The problem is that each time a change the Start or End
time for one record in the form all of the Hours are
updated to the same number of hours.
Name Start End Hours
DJ 5:00 PM 9:00 PM 4.00
Tillman 4:40 PM 9:00 PM 4.00
Omolayo 4:50 PM 9:00 PM 4.00
Fadina 4:45 PM 9:00 PM 4.00
Mayo 4:45 PM 9:00 PM 4.00
DJ 5:00 PM 9:00 PM 5.83
Tillman 4:40 PM 9:00 PM 5.83
Omolayo 4:50 PM 9:00 PM 5.83
Fadina 4:45 PM 9:00 PM 5.83
Mayo 4:45 PM 9:00 PM 5.83
Does anyone know what I need to do to fix this? I am fine
for the after midnight test. It is just the rolling Hours
that needs fixing. And please state things simple. I am
new to access and VBA.
Thanks
James
Procedure in it. Part of the coding is as follows, the
rest is just Dim and Error.
Hours = Me.End_Time - Me.Start_Time
If Hours < 0 Then
AdHours = Hours + 24
Else
AdHours = Hours
End If
Me.Hours = Hours
The problem is that each time a change the Start or End
time for one record in the form all of the Hours are
updated to the same number of hours.
Name Start End Hours
DJ 5:00 PM 9:00 PM 4.00
Tillman 4:40 PM 9:00 PM 4.00
Omolayo 4:50 PM 9:00 PM 4.00
Fadina 4:45 PM 9:00 PM 4.00
Mayo 4:45 PM 9:00 PM 4.00
DJ 5:00 PM 9:00 PM 5.83
Tillman 4:40 PM 9:00 PM 5.83
Omolayo 4:50 PM 9:00 PM 5.83
Fadina 4:45 PM 9:00 PM 5.83
Mayo 4:45 PM 9:00 PM 5.83
Does anyone know what I need to do to fix this? I am fine
for the after midnight test. It is just the rolling Hours
that needs fixing. And please state things simple. I am
new to access and VBA.
Thanks
James