Filter Button In Form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am looking to create three buttons in my form that creates three different
filters? Is there anyway of doing this without having to manually select
fields each time? Can I have them linked to a query or something?
Just for a bit more info...I want the buttons to filter out my Yes/No check
boxes for A Prospect Customer, a Pending Customer, and a Sold Customer; so
when I click the button I am able to use my "Next/Previous" button and scroll
through each of the customers.
 
Let's say you have 3 fields ysnProspect, ysnPending and ysnSold.
Let's say you also have 3 buttons btnProspect, btnPending, btnSold.

In the click event of btnProspect:
Me.Filter = "[ysnProspect] = " & True
Me.FilterOn = True

In the click event of btnPending:
Me.Filter = "[ysnPending] = " & True
Me.FilterOn = True

In the click event of btnSold:
Me.Filter = "[ysnSold] = " & True
Me.FilterOn = True

Steve
 

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

Back
Top