Filter help

BenSteckler

Addicted to Programming
Local time
Today, 03:06
Joined
Oct 4, 2000
Messages
44
I have a table that has a few check boxes
(Example: Paid, OverPayment, Late)

I would like to be able to click on a button that would open a form that contains only the data that has a Check mark.
(Ex: That says "Show Overpayment" that would show all records that have the OverPayment box checked.)

I would like to use the docmd openform but I can not get the Apply filter to work. Can anyone help?

Ben_Steckler@hotmail.com
 
Is the Paid, Overpayment, Late data in the same field in your table?
If so, you could use a query as your record source for your response form, and use a Select Case statement to provide criteria for your query.
 
Thanks for the reply,

In answer to your question: No They are in Separate columns.
(Ex: Column one has Check box Titled “Paid”
Column two has another titled “Overpayment”)

So what I have had to do in the past was make one query that show all Overpayments.

Then I would have to make another query that is exactly the same but the criteria says Show all Paid.

I would like to use the same query but change the Criteria based on the button pushed on the form.
 
Perhaps you could use code to filter your results rather than a query. You could put this behind your Paid button:

DoCmd.OpenForm "YourResponseForm" , , , "[Paid] = -1"
Then behind your Late button put:
DoCmd.OpenForm "YourResponseForm" , , , "[Late] = -1"

etc.
 
If you want to use a filter, type in the code:

Forms![YourForm].Filter=strYourFilterString
Forms![YourForm].FilterOn=True

Duane Barker
 
Thanks they both worked great.
smile.gif
 

Users who are viewing this thread

Back
Top Bottom