R
Rosemary
Hi,
I have code in the AfterUpdate event of a Date/Time field (named
"ClockedIn") that increments my Job Number field(named "ReqNo"), starting
with the number 1 at the start of each day. (The code is below, following
this message.)
I would like to have the Job Numbers ordered first by Date/Time, then by Job
Number.
I started with:
Me.OrderBy . . . , but wasn't able to finish the statement.
----------------------
Dim tempDate As String
Me!ClockedIn.Value = Now()
tempDate = Format(Now(), "ddddd")
If DCount("[ReqNo]", "Tasks", "[ClockedIn] > #" & tempDate & "#") = 0 Then
Me.ReqNo = 1
Else
Me.ReqNo = DMax("[ReqNo]", "Tasks", "[ClockedIn] > #" & tempDate & "#") + 1
End If
I have code in the AfterUpdate event of a Date/Time field (named
"ClockedIn") that increments my Job Number field(named "ReqNo"), starting
with the number 1 at the start of each day. (The code is below, following
this message.)
I would like to have the Job Numbers ordered first by Date/Time, then by Job
Number.
I started with:
Me.OrderBy . . . , but wasn't able to finish the statement.
----------------------
Dim tempDate As String
Me!ClockedIn.Value = Now()
tempDate = Format(Now(), "ddddd")
If DCount("[ReqNo]", "Tasks", "[ClockedIn] > #" & tempDate & "#") = 0 Then
Me.ReqNo = 1
Else
Me.ReqNo = DMax("[ReqNo]", "Tasks", "[ClockedIn] > #" & tempDate & "#") + 1
End If