Good Morning,
I have a Continuous form with the following fields: ‘Surname’, ‘Givenname’ & ‘City’.
With the right button of the mouse, from the contextual menu, I can sort the column in ascending or descending.
How to do on the event of my form under ‘On Apply Filter’ to execute a macro depending if the fields is sorting in ascending or descending.
I tried the below but does not work.
Sub Form_ApplyFilter(Cancel As Integer, ApplyType As Integer)
If Me.Surname Like "DESC" = True Then
Macro1
ElseIf Me.Surname Like "ASC" = True Then
Macro2
ElseIf Me.Givenname’ Like "DESC" = True Then
Macro3
ElseIf Me.Givenname’ Like "ASC" = True Then
Macro4
Etc…
End If
End Sub
Thank you for you help.
Best Regards,
Xavier