I'm not sure why this doesn't work. I have a continuous form whose query is not updatable so the form is populated using
Code:
Dim rst As DAO.RecordsetDim db As DAO.Database
Set db = CurrentDb
Set rst = db.OpenRecordset("qrydoesthiswork")
If Not rst.EOF Then
Set Me.Recordset = makeADORecordset(rst)
End If
rst.Close
Set rst = Nothing
When the form opens. This works absolutely fine.
I've now been asked to be able to reorder the form and I assumed I could use:
Code:
Private Sub cmdsortscore_Click()
Me.OrderBy = "TotalScore"
Me.OrderByOn = True
End Sub
This works fine reordering the data according to total score.
However when I click on another button to order the data by Surname again using:
Code:
Private Sub cmdsortname_Click()
Me.OrderBy = "Surname"
Me.OrderByOn = True
End Sub
The page doesn't reorder.
I've since noticed that reordering by anything only works if its the first button you press.
Can anyone put me straight here please?