Sorting Records

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.
 
M

Marshall Barton

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top