Access World Forums

Access World Forums (https://www.access-programmers.co.uk/forums/index.php)
-   Queries (https://www.access-programmers.co.uk/forums/forumdisplay.php?f=8)
-   -   [SOLVED] multiple filter criteria on same field (https://www.access-programmers.co.uk/forums/showthread.php?t=267438)

rodrigoturbina 07-30-2014 06:15 AM

multiple filter criteria on same field
 
Hi everyone this is Rod, I am using MS Access 2007.

I would like to display a report based on the table called "expenses", filtered by:
- "from" (datefrom field) and "to" (dateto field) date on "payment date" field;
- multiple criteria on same field called "payment method" (I would like to include only payment methods "check" and "credit card", but not the other payment methods in the field, such as "cash", "transfer", etc.)

For that end I made a query based on the table "expenses", and in the "payment date", in the criteria field, I entered:

between [form]![formname]![datefrom] and [form]![formname]![dateto]

This works fine so far, however when I attempt to add multiple criteria on the "payment method" field, it does not filter accurately any longer. In the same row of the criteria field where I completed the date criteria, I enter "check". In the next row, same field, I enter "credit card".

Since it doesn´t work, I tried putting both arguments in the same line as the date criteria (always in the payment method field) as: "check" and "credit card" but still does not work (now it filters the payment method correctly, but the dates filter appear as if I have never completed them).

Hope you can provide some help here :)
Thanks in advance
Rod

pbaldy 07-30-2014 06:27 AM

Re: multiple filter criteria on same field
 
In the same line as the date criteria try

In("check", "credit card")

rodrigoturbina 07-30-2014 06:30 AM

Re: multiple filter criteria on same field
 
That worked! thanks so much for the prompt response, Paul :)

pbaldy 07-30-2014 06:35 AM

Re: multiple filter criteria on same field
 
Happy to help Rod!


All times are GMT -8. The time now is 07:21 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World