G
gefilte
I've seen plenty of solutions for initial sorting, but nothing for this...
I have a form with multiple fields.
On the onclick event for the lables for the columns, is:
[fieldname].SetFocus
DoCmd.RunCommand acCmdSortAscending
How can I add a feature to allow the user to click it again and sort
descending if it is already ascending?
I'm guessing that I can pass a reference to a variable to store the current
state of sorting ie.
if me.[sort_tbl].[sort_date] = true
then sort desc
me.me.[sort_tbl].[sort_date] = false
else
sort asc
me.[sort_tbl].[sort_date] = true
however, it's giving me an error that it can't find the field for
[sort_tbl].[sort_date]
How should I reference it?
Thanks
I have a form with multiple fields.
On the onclick event for the lables for the columns, is:
[fieldname].SetFocus
DoCmd.RunCommand acCmdSortAscending
How can I add a feature to allow the user to click it again and sort
descending if it is already ascending?
I'm guessing that I can pass a reference to a variable to store the current
state of sorting ie.
if me.[sort_tbl].[sort_date] = true
then sort desc
me.me.[sort_tbl].[sort_date] = false
else
sort asc
me.[sort_tbl].[sort_date] = true
however, it's giving me an error that it can't find the field for
[sort_tbl].[sort_date]
How should I reference it?
Thanks