HI.
I've added some sort buttons to a form, but I'm not sure why they're not working.
Could someone have a look please & tell me where I'm going wrong.
TIA
Sort not working
-
- 5StarLounger
- Posts: 736
- Joined: 18 Mar 2010, 11:05
Sort not working
You do not have the required permissions to view the files attached to this post.
-
- Administrator
- Posts: 78545
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Sort not working
You're setting OrderBy to a field and then setting OrderBy to True - that makes no sense. After setting OrderBy to a field, you must set OrderByOn to True to make the sort order active. There is no need to set OrderByOn to False first.
etc.
Code: Select all
Private Sub FirstNameUp_Click()
Me.OrderBy = "FirstName"
Me.OrderByOn = True
End Sub
Best wishes,
Hans
Hans
-
- 5StarLounger
- Posts: 736
- Joined: 18 Mar 2010, 11:05
Re: Sort not working
Doh!
That's what comes from rushing.
Thank you muchly.
I had put in the 'OrderByOn to False' to negate any other sort that had been put on the recordset.
That's what comes from rushing.
Thank you muchly.
I had put in the 'OrderByOn to False' to negate any other sort that had been put on the recordset.