conditional form filtering/ordering

  • Thread starter Thread starter papa jonah
  • Start date Start date
P

papa jonah

I have a form with two radio buttons that I hope will one day dictate
how the records on the form are sorted.
Currently they are sorted by "designator". The radio options are to
allow the user to sort by either the designator or by "date". I can
manually do this just fine.
Here is the code that I have put in the afterupdate and also in the
after click events for the radio button group:
Private Sub optSort_AfterUpdate()
If optSort = 2 Then
Me.OrderBy = "Designator"
Else
Me.OrderBy = "discovery_date"
End If
Me.Refresh

End Sub

However, it does not seem to matter which radio button is clicked. The
form properties sort value updates but the form does not.
 
I replaced as you suggested.
It is obvious now that it does some reordering. However, it is only
momentary before I get an error, a backup, and a shutdown of Access. I
get the error that says it wants to send a report to Microsoft.
Any idea why?
 
Back
Top