Re: Command button to change my form's dataset

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Van T. Dinh (VanThien.Dinh_at_discussions.microsoft.com)
Date: 04/30/04


Date: Fri, 30 Apr 2004 11:53:44 +1000


****Untested****
Private Sub cmdCurrent_Click()
    Me.Filter = "[Retired] = False"
    Me.FilterOn = True
End Sub

-- 
HTH
Van T. Dinh
MVP (Access)
"Joseph Ellis" <jandellis@cox.net> wrote in message
news:raa390h1k82ou02vl3gqe1nrgc5grgjpd2@4ax.com...
> Hello all,
>
> I have a church directory database which contains information about
> both current and past church members.  I've made a form which displays
> all the records in the table (that is, none are filtered out yet).
>
> I'd like to put a button on the form that when pressed would cause the
> form to display information of current members only.
>
> The field that designates whether a person is "current" or not is
> called "Retired", and is in a table called "Households".
>
> I assume that I'd use the On Click event to do this, but that's where
> I'm stuck.  What do I need to enter there to make the form display
> only those records in which Retired = False?
>
> Or is there a better way to do it?
>
> Thanks,
> Joseph

Quantcast