Sorting Records

  • Thread starter Thread starter Merwin12
  • Start date Start date
M

Merwin12

Need help on this:

This is the code behind my command button's on click
event:
Me.OrderBy = "Control"
Me.OrderByOn = True

Clicking it once it sorts in ascending order.
Then how do I do it in descending order ?

Pls. advise.
Thanks.
 
Merwin12 said:
Need help on this:

This is the code behind my command button's on click
event:
Me.OrderBy = "Control"
Me.OrderByOn = True

Clicking it once it sorts in ascending order.
Then how do I do it in descending order ?

Try this:

If Me.OrderBy = "Control" Then
Me.OrderBy = "Control DESC"
Else
Me.OrderBy = "Control"
End If
Me.OrderByOn = True
 
Back
Top