I would like to use command buttons in the footer to sort the records (I
will have three buttons, Sort by Name, Sort by Date, Sort by Status).
I used the following code:
Private Sub cmdSortName_Click()
Me.OrderBy = "[Person]"
Me.OrderByOn = True
End Sub
But when I click the button, I get the message
"The expression On Click you entered as the event property setting produced
the following error: Invalid outside procedure".
I'm pretty sure I'm missing something quite straightforward here. I would
appreciate your help
Another way of doing this and you can use it on all the control on a
continous form would be to add a label for each "column" (control) on the
form.
So If you had controls with 1st name 2ndname dateofbirth etc
you would add a lable to the form header above each column
Put this on click of each label
Private Sub LabelName_Click()
Me.OrderBy = "[ControlName]"
Me.OrderByOn = True
End Sub
Change the LableName and ControlName to what the really are
Users like these as they are easy to understand and I use them as they
remove the need to add another button to a form - I try to keep the forms
un-cluttered
--
Wayne
Manchester, England.