Good morning,
I have a continuous form that has multiple columns. The end user needs the ability to sort asc and desc in each of the columns. This is not possible without code on a continuous form. I have built command buttons to allow this in each of the columns. Works great on load of the form. There is the ability to use parameter to filter needed items based on a control in the form. (works great) When the form opens, I have set the default of the form "Me.OrderBy =PageID asc". The command code for each of the sort buttons is set to (based on the field I want to sort)
Private Sub cmdAsc2_Click()
Me.OrderBy = "MCFieldName ASC"
End Sub
and works great until I try and clear the parameter in the control using
Private Sub cmdClearFilter_Click()
txtFilterName = Null
Me.RecordSource = "qryMgtMCField_Page"
'Me.OrderBy = "PageID ASC"
End Sub
When I attempt to then go back and use the sort command buttons, they do not work. The property sheet shows that the sort should be with the corresponding field, but the command does not finish the execution by sorting (Orderby). Thoughts?