Filter Forms - for dummy(s)

Tskutnik

Registered User.
Local time
Today, 14:25
Joined
Sep 15, 2012
Messages
234
All, Thanks in advance for the help. Super easy question and I can't find the super easy answer.

I want to add a combo box to a form to filter the list of records, and I cant get it. I see the options to create another form and subform, etc. but it cant be that involved.

The database is attached - with the form and supporting table. The combo filter in the form should default to Active records (the yes/no column), with an option to show All records or Inactive records.

Thanks again. Cant believe I cannot get this.
 

Attachments

In the After Update event of your combo

Code:
Private Sub Combo13_AfterUpdate()

    Select Case Me.Combo13
    Case "Active"
        Me.Filter = "Active = -1" 'show only Active
        Me.FilterOn = True
    Case "Inactive"
        Me.Filter = "Active = 0"  'show only inactive
        Me.FilterOn = True
    Case "all"
        Me.FilterOn = False   'show everything
    End Select
End Sub
 
Perfect, thanks for the help. One tweak, how do I set the default to "Active" upon open?
 
Put a default value in the combobox property as below.

attachment.php
 

Attachments

  • ComboDefaultValue.png
    ComboDefaultValue.png
    21.5 KB · Views: 197

Users who are viewing this thread

Back
Top Bottom