Listing dates ascending
I need to have the results from Date5 listed in ascending order. How do I have it do that?
Here is the code:
im dow As String ' Day Of Week
Dim Offset As Integer ' Number of days offset
If IsNull(Me![Due Date]) Then GoTo Exit_This
dow = Me![Due Date]
' ------------------------------------------------------------
' First calculate the DUE DATE by ensuring it is not a weekend
' ------------------------------------------------------------
If Weekday(dow) = 7 Then dow = DateAdd("D", 2, dow) ' Saturday add 2
If Weekday(dow) = 1 Then dow = DateAdd("D", 1, dow) ' Sunday add 1
Me![Date5] = Format(dow, "dd-mmm-yyyy")
|