Option Group Apply Multiple Filters (1 Viewer)

rangersedge

Registered User.
Local time
Yesterday, 18:09
Joined
Jun 13, 2014
Messages
82
I have a form with 5 options in a group. This works fine when I only have 1 filter applied to each button. I need to select the "Not Collected" button and have it filter out and show "Collected = No" and "Deleted = No". Here is my code... any help? Case 3 is the one I'm currently working on. I can get the others once I figure out the first one.

Private Sub Frame799_Click()

Select Case Frame799
Case 1
Forms![Asset Details].Form.FilterOn = False
Case 2
Me.Filter = "[Collected] = Yes"
Case 3
Me.Filter = "[Collected] = No"
Me.Filter = "[Deleted] = No"
Case 4
Me.Filter = "[Watched] = No"
Me.Filter = "[Collected] = Yes"
Me.Filter = "[Deleted] = No"
Case 5
Me.Filter = "[Deleted] = Yes"
Case Else
MsgBox "Not a valid Option", vbInformation
End Select

Me.FilterOn = True

End Sub


I'm also having trouble with the reset button in Case 1 to turn off all filters.
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 16:09
Joined
Aug 30, 2003
Messages
36,127
Me.Filter = "[Collected] = No AND [Deleted] = No"
 

rangersedge

Registered User.
Local time
Yesterday, 18:09
Joined
Jun 13, 2014
Messages
82
Awesome. That worked. Now I can't get the Reset to work. I've tried "Filter = "" and Me.FilterOn = False
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 16:09
Joined
Aug 30, 2003
Messages
36,127
I would expect

Me.FilterOn = False

to work. Can you post the db here?
 

rangersedge

Registered User.
Local time
Yesterday, 18:09
Joined
Jun 13, 2014
Messages
82
Not the full db. It has personal Info stored in it. I will have to move the needed items to a new one and post it later.
 

Users who are viewing this thread

Top Bottom