conditional form filtering/ordering

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.
 
P

papa jonah

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top