It should be really simple -- but I've looked everywhere and I couldn't
find it.
Basically, I'm just looking for a button that can toggle between sort
ascending and sort descending on a form. It can be done with a right-click
menu item, so I figured it would be simple code.
I found this in an Access 97 book, but it only works on the ascending.
Dim str As String, tgl As ToggleButton
str = "Forms!frmViewAll!lblDESCRIPTION"
Set tgl = TglDescription
Select Case tgl.Value
Case True
Me.OrderBy = str & " DESC"
Me.OrderByOn = True
Case False
Me.OrderBy = str & " DESC"
Me.OrderByOn = False
End Select
End Sub
===============
I think the problem is with the line Me.OrderBy = str $ " DESC"
The code now will go from unsorted to sort ascending, but it won't toggle
to the sort descending.
Thanks in advance for your help.
Bill
SPONSORED LINKS
| Microsoft access database | Database development software | Database management software |
| Database software | Inventory database software | Membership database software |
YAHOO! GROUPS LINKS
- Visit your group "ms_access" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
