I have a form that has a toggle button in a subform that changes which subform shows up and the related sort order (among a bunch of other formatting options).
The orderby section (form open event) looks like this:
If Forms![Main Review Form]![View Type Subform].Form!View = True Then
Me.OrderBy = "Inst Name"
Me.OrderByOn = True
Else
If Forms![Main Review Form]![View Type Subform].Form!View = False Then
Me.OrderBy = "LOI Inst Name"
Me.OrderByOn = True
End If
End If
End Sub
I would like to take this one step further in that if there are null values in the 'orderby' field I would like those records to show up last in the order.
I know that in reports you can group & then order records like this using a formula like the following: =IIf([LNames]>"",1,2)
Is there a similar code for forms?
The orderby section (form open event) looks like this:
If Forms![Main Review Form]![View Type Subform].Form!View = True Then
Me.OrderBy = "Inst Name"
Me.OrderByOn = True
Else
If Forms![Main Review Form]![View Type Subform].Form!View = False Then
Me.OrderBy = "LOI Inst Name"
Me.OrderByOn = True
End If
End If
End Sub
I would like to take this one step further in that if there are null values in the 'orderby' field I would like those records to show up last in the order.
I know that in reports you can group & then order records like this using a formula like the following: =IIf([LNames]>"",1,2)
Is there a similar code for forms?