I've built a Job position experiences table and I need the subform to refresh its sort order on loading...
Need help with vba to sort by End_Date first if available but if not, then by the start date field.
The below table illustrates the desired sort order and my challenge when we don't have a complete record.
I figure the code is going to be starting off like below. Any help would be appreciated.
Need help with vba to sort by End_Date first if available but if not, then by the start date field.
The below table illustrates the desired sort order and my challenge when we don't have a complete record.
I figure the code is going to be starting off like below. Any help would be appreciated.
Code:
Private Sub Form_Load()
If IsNull(Me.End_Date) Then
Me.OrderBy = "[End_Date] DESC, [Start_Date] DESC"
Elseif then
End If
End Sub